{
if (cfProtocolsArrayRef != null)
{
- for (int i = 0; i < cfProtocolsArrayRef.Length ; i++)
+ for (int i = 0; i < cfProtocolsArrayRef.Length; i++)
{
cfProtocolsArrayRef[i]?.Dispose();
}
public Status MajorStatus
{
- get { return (Status)HResult;}
+ get { return (Status)HResult; }
}
public Status MinorStatus
{
- get { return _minorStatus;}
+ get { return _minorStatus; }
}
public GssApiException(string message) : base(message)
internal struct WSABuffer
{
internal int Length; // Length of Buffer
- internal IntPtr Pointer;// Pointer to Buffer
+ internal IntPtr Pointer; // Pointer to Buffer
}
}
fixed (char* pFormat = &MemoryMarshal.GetReference(format))
{
int src = 0;
- for (;;)
+ while (true)
{
if (src >= format.Length)
{
{
if (pArg is ExprList list)
{
- for (;;)
+ while (true)
{
list.OptionalElement = StripNamedArgument(list.OptionalElement);
private static void MarkAsIntermediateConversion(Expr pExpr)
{
- for (;;)
+ while (true)
{
Debug.Assert(pExpr != null);
if (pExpr is ExprCall call)
MethodSymbol methCur = null;
AggregateType atsCur = (AggregateType)typeSrc;
- for (;;)
+ while (true)
{
// Find the next operator.
methCur = (methCur == null
while (_HiddenTypes.Contains(_pCurrentType))
{
// Move through this type and get the next one.
- for (; iterator.CurrentType == _pCurrentType; iterator.MoveNext()) ;
+ for (; iterator.CurrentType == _pCurrentType; iterator.MoveNext());
_pCurrentSym = iterator.CurrentSymbol;
_pCurrentType = iterator.CurrentType;
Debug.Assert(typeCur != null);
// Loop through the interfaces.
- for (; ;)
+ while (true)
{
Debug.Assert(typeCur != null && typeCur.IsInterfaceType);
private bool FindNextMethod()
{
- for (;;)
+ while (true)
{
CurrentSymbol = (CurrentSymbol == null
? SymbolLoader.LookupAggMember(_name, CurrentType.OwningAggregate, _mask)
if (typeSrc is AggregateType aggSrc)
{
- for (;;)
+ while (true)
{
if ((aggSrc.IsInterfaceType || aggSrc.IsDelegateType) && TryVarianceAdjustmentToGetAccessibleType(context, aggSrc, out CType typeDst))
{
{
//reader through which we access the source data
private readonly IEnumerator<TSource> _sharedReader;
- private readonly SharedLong _sharedIndex;//initial value -1
+ private readonly SharedLong _sharedIndex; //initial value -1
private volatile KeyValuePair<long, TSource>[]? _fillBuffer; // intermediate buffer to reduce locking
private volatile int _fillBufferSize; // actual number of elements in _FillBuffer. Will start
private readonly SharedBool _sourceDepleted; // no elements left in the enumerator, but there may be elements in the Fill Buffer
//shared synchronization lock, created by this Enumerable
- private readonly object _sharedLock;//deferring allocation by enumerator
+ private readonly object _sharedLock; //deferring allocation by enumerator
private bool _disposed;
disposableRootProvider = _disposableRootProvider;
_disposableRootProvider = null;
- disposableLocalExportProvider = _disposableLocalExportProvider ;
+ disposableLocalExportProvider = _disposableLocalExportProvider;
_disposableLocalExportProvider = null;
_localExportProvider = null;
bool hasConstraints = false;
object[] genericParameterConstraints = new object[genericArguments.Length];
GenericParameterAttributes[] genericParameterAttributes = new GenericParameterAttributes[genericArguments.Length];
- for (int i=0; i< genericArguments.Length ; i++)
+ for (int i=0; i< genericArguments.Length; i++)
{
Type genericArgument = genericArguments[i];
internal const int cmdidObjectVerbList6 = 143;
internal const int cmdidObjectVerbList7 = 144;
internal const int cmdidObjectVerbList8 = 145;
- internal const int cmdidObjectVerbList9 = 146;// Unused on purpose!
+ internal const int cmdidObjectVerbList9 = 146; // Unused on purpose!
internal const int cmdidConvertObject = 147;
internal const int cmdidCustomControl = 148;
internal const int cmdidRemove = 168;
internal const int cmdidJoinLeftAll = 169;
internal const int cmdidJoinRightAll = 170;
- internal const int cmdidAddToOutput = 171;// Add selected fields to query output
- internal const int cmdidOtherQuery = 172;// change query type to 'other'
+ internal const int cmdidAddToOutput = 171; // Add selected fields to query output
+ internal const int cmdidOtherQuery = 172; // change query type to 'other'
internal const int cmdidGenerateChangeScript = 173;
- internal const int cmdidSaveSelection = 174;// Save current selection
- internal const int cmdidAutojoinCurrent = 175;// Autojoin current tables
- internal const int cmdidAutojoinAlways = 176;// Toggle Autojoin state
- internal const int cmdidEditPage = 177;// Launch editor for url
- internal const int cmdidViewLinks = 178;// Launch new webscope for url
- internal const int cmdidStop = 179;// Stope webscope rendering
- internal const int cmdidPause = 180;// Pause webscope rendering
- internal const int cmdidResume = 181;// Resume webscope rendering
- internal const int cmdidFilterDiagram = 182;// Filter webscope diagram
- internal const int cmdidShowAllObjects = 183;// Show All objects in webscope diagram
- internal const int cmdidShowApplications = 184;// Show Application objects in webscope diagram
- internal const int cmdidShowOtherObjects = 185;// Show other objects in webscope diagram
- internal const int cmdidShowPrimRelationships = 186;// Show primary relationships
- internal const int cmdidExpand = 187;// Expand links
- internal const int cmdidCollapse = 188;// Collapse links
- internal const int cmdidRefresh = 189;// Refresh Webscope diagram
- internal const int cmdidLayout = 190;// Layout websope diagram
- internal const int cmdidShowResources = 191;// Show resouce objects in webscope diagram
- internal const int cmdidInsertHTMLWizard = 192;// Insert HTML using a Wizard
- internal const int cmdidShowDownloads = 193;// Show download objects in webscope diagram
- internal const int cmdidShowExternals = 194;// Show external objects in webscope diagram
- internal const int cmdidShowInBoundLinks = 195;// Show inbound links in webscope diagram
- internal const int cmdidShowOutBoundLinks = 196;// Show out bound links in webscope diagram
- internal const int cmdidShowInAndOutBoundLinks = 197;// Show in and out bound links in webscope diagram
- internal const int cmdidPreview = 198;// Preview page
- internal const int cmdidOpen = 261;// Open
- internal const int cmdidOpenWith = 199;// Open with
- internal const int cmdidShowPages = 200;// Show HTML pages
- internal const int cmdidRunQuery = 201;// Runs a query
- internal const int cmdidClearQuery = 202;// Clears the query's associated cursor
- internal const int cmdidRecordFirst = 203;// Go to first record in set
- internal const int cmdidRecordLast = 204;// Go to last record in set
- internal const int cmdidRecordNext = 205;// Go to next record in set
- internal const int cmdidRecordPrevious = 206;// Go to previous record in set
- internal const int cmdidRecordGoto = 207;// Go to record via dialog
- internal const int cmdidRecordNew = 208;// Add a record to set
-
- internal const int cmdidInsertNewMenu = 209;// menu designer
- internal const int cmdidInsertSeparator = 210;// menu designer
- internal const int cmdidEditMenuNames = 211;// menu designer
+ internal const int cmdidSaveSelection = 174; // Save current selection
+ internal const int cmdidAutojoinCurrent = 175; // Autojoin current tables
+ internal const int cmdidAutojoinAlways = 176; // Toggle Autojoin state
+ internal const int cmdidEditPage = 177; // Launch editor for url
+ internal const int cmdidViewLinks = 178; // Launch new webscope for url
+ internal const int cmdidStop = 179; // Stope webscope rendering
+ internal const int cmdidPause = 180; // Pause webscope rendering
+ internal const int cmdidResume = 181; // Resume webscope rendering
+ internal const int cmdidFilterDiagram = 182; // Filter webscope diagram
+ internal const int cmdidShowAllObjects = 183; // Show All objects in webscope diagram
+ internal const int cmdidShowApplications = 184; // Show Application objects in webscope diagram
+ internal const int cmdidShowOtherObjects = 185; // Show other objects in webscope diagram
+ internal const int cmdidShowPrimRelationships = 186; // Show primary relationships
+ internal const int cmdidExpand = 187; // Expand links
+ internal const int cmdidCollapse = 188; // Collapse links
+ internal const int cmdidRefresh = 189; // Refresh Webscope diagram
+ internal const int cmdidLayout = 190; // Layout websope diagram
+ internal const int cmdidShowResources = 191; // Show resouce objects in webscope diagram
+ internal const int cmdidInsertHTMLWizard = 192; // Insert HTML using a Wizard
+ internal const int cmdidShowDownloads = 193; // Show download objects in webscope diagram
+ internal const int cmdidShowExternals = 194; // Show external objects in webscope diagram
+ internal const int cmdidShowInBoundLinks = 195; // Show inbound links in webscope diagram
+ internal const int cmdidShowOutBoundLinks = 196; // Show out bound links in webscope diagram
+ internal const int cmdidShowInAndOutBoundLinks = 197; // Show in and out bound links in webscope diagram
+ internal const int cmdidPreview = 198; // Preview page
+ internal const int cmdidOpen = 261; // Open
+ internal const int cmdidOpenWith = 199; // Open with
+ internal const int cmdidShowPages = 200; // Show HTML pages
+ internal const int cmdidRunQuery = 201; // Runs a query
+ internal const int cmdidClearQuery = 202; // Clears the query's associated cursor
+ internal const int cmdidRecordFirst = 203; // Go to first record in set
+ internal const int cmdidRecordLast = 204; // Go to last record in set
+ internal const int cmdidRecordNext = 205; // Go to next record in set
+ internal const int cmdidRecordPrevious = 206; // Go to previous record in set
+ internal const int cmdidRecordGoto = 207; // Go to record via dialog
+ internal const int cmdidRecordNew = 208; // Add a record to set
+
+ internal const int cmdidInsertNewMenu = 209; // menu designer
+ internal const int cmdidInsertSeparator = 210; // menu designer
+ internal const int cmdidEditMenuNames = 211; // menu designer
internal const int cmdidDebugExplorer = 212;
internal const int cmdidDebugProcesses = 213;
internal const int cmdidDockingViewFloater = 291;
internal const int cmdidAutoHideWindow = 292;
internal const int cmdidMoveToDropdownBar = 293;
- internal const int cmdidFindCmd = 294;// internal Find commands
+ internal const int cmdidFindCmd = 294; // internal Find commands
internal const int cmdidStart = 295;
internal const int cmdidRestart = 296;
internal const int cmdidFindHelp = 356;
internal const int cmdidFindInFiles = 277;
internal const int cmdidReplaceInFiles = 278;
- internal const int cmdidNextLocation = 279;// next item in task list, find in files results, etc.
- internal const int cmdidPreviousLocation = 280;// prev item "
+ internal const int cmdidNextLocation = 279; // next item in task list, find in files results, etc.
+ internal const int cmdidPreviousLocation = 280; // prev item "
internal const int cmdidTaskListNextError = 357;
internal const int cmdidTaskListPrevError = 358;
internal const int cmdidMarkerCmd8 = 408;
internal const int cmdidMarkerCmd9 = 409;
internal const int cmdidMarkerLast = 409;
- internal const int cmdidMarkerEnd = 410;// list terminator reserved
+ internal const int cmdidMarkerEnd = 410; // list terminator reserved
// user-invoked project reload and unload
internal const int cmdidReloadProject = 412;
internal const int cmdidWindow22 = 591;
internal const int cmdidWindow23 = 592;
internal const int cmdidWindow24 = 593;
- internal const int cmdidWindow25 = 594;// note cmdidWindow25 is unused on purpose!
+ internal const int cmdidWindow25 = 594; // note cmdidWindow25 is unused on purpose!
internal const int cmdidMoreWindows = 595;
//internal const int = 597;//UNUSED
internal const int cmdidMRUProj22 = 621;
internal const int cmdidMRUProj23 = 622;
internal const int cmdidMRUProj24 = 623;
- internal const int cmdidMRUProj25 = 624;// note cmdidMRUProj25 is unused on purpose!
+ internal const int cmdidMRUProj25 = 624; // note cmdidMRUProj25 is unused on purpose!
internal const int cmdidSplitNext = 625;
internal const int cmdidSplitPrev = 626;
internal const int cmdidNextDocument = 628;
internal const int cmdidPrevDocument = 629;
- internal const int cmdidTool1 = 630;// note cmdidTool1 - cmdidTool24 must be
- internal const int cmdidTool2 = 631;// consecutive
+ internal const int cmdidTool1 = 630; // note cmdidTool1 - cmdidTool24 must be
+ internal const int cmdidTool2 = 631; // consecutive
internal const int cmdidTool3 = 632;
internal const int cmdidTool4 = 633;
internal const int cmdidTool5 = 634;
internal const int cmdidCloseDocument = 658;
internal const int cmdidToolboxSortItems = 659;
- internal const int cmdidViewBarView1 = 660;//UNUSED
- internal const int cmdidViewBarView2 = 661;//UNUSED
- internal const int cmdidViewBarView3 = 662;//UNUSED
- internal const int cmdidViewBarView4 = 663;//UNUSED
- internal const int cmdidViewBarView5 = 664;//UNUSED
- internal const int cmdidViewBarView6 = 665;//UNUSED
- internal const int cmdidViewBarView7 = 666;//UNUSED
- internal const int cmdidViewBarView8 = 667;//UNUSED
- internal const int cmdidViewBarView9 = 668;//UNUSED
- internal const int cmdidViewBarView10 = 669;//UNUSED
- internal const int cmdidViewBarView11 = 670;//UNUSED
- internal const int cmdidViewBarView12 = 671;//UNUSED
- internal const int cmdidViewBarView13 = 672;//UNUSED
- internal const int cmdidViewBarView14 = 673;//UNUSED
- internal const int cmdidViewBarView15 = 674;//UNUSED
- internal const int cmdidViewBarView16 = 675;//UNUSED
- internal const int cmdidViewBarView17 = 676;//UNUSED
- internal const int cmdidViewBarView18 = 677;//UNUSED
- internal const int cmdidViewBarView19 = 678;//UNUSED
- internal const int cmdidViewBarView20 = 679;//UNUSED
- internal const int cmdidViewBarView21 = 680;//UNUSED
- internal const int cmdidViewBarView22 = 681;//UNUSED
- internal const int cmdidViewBarView23 = 682;//UNUSED
- internal const int cmdidViewBarView24 = 683;//UNUSED
+ internal const int cmdidViewBarView1 = 660; //UNUSED
+ internal const int cmdidViewBarView2 = 661; //UNUSED
+ internal const int cmdidViewBarView3 = 662; //UNUSED
+ internal const int cmdidViewBarView4 = 663; //UNUSED
+ internal const int cmdidViewBarView5 = 664; //UNUSED
+ internal const int cmdidViewBarView6 = 665; //UNUSED
+ internal const int cmdidViewBarView7 = 666; //UNUSED
+ internal const int cmdidViewBarView8 = 667; //UNUSED
+ internal const int cmdidViewBarView9 = 668; //UNUSED
+ internal const int cmdidViewBarView10 = 669; //UNUSED
+ internal const int cmdidViewBarView11 = 670; //UNUSED
+ internal const int cmdidViewBarView12 = 671; //UNUSED
+ internal const int cmdidViewBarView13 = 672; //UNUSED
+ internal const int cmdidViewBarView14 = 673; //UNUSED
+ internal const int cmdidViewBarView15 = 674; //UNUSED
+ internal const int cmdidViewBarView16 = 675; //UNUSED
+ internal const int cmdidViewBarView17 = 676; //UNUSED
+ internal const int cmdidViewBarView18 = 677; //UNUSED
+ internal const int cmdidViewBarView19 = 678; //UNUSED
+ internal const int cmdidViewBarView20 = 679; //UNUSED
+ internal const int cmdidViewBarView21 = 680; //UNUSED
+ internal const int cmdidViewBarView22 = 681; //UNUSED
+ internal const int cmdidViewBarView23 = 682; //UNUSED
+ internal const int cmdidViewBarView24 = 683; //UNUSED
internal const int cmdidSolutionCfg = 684;
internal const int cmdidSolutionCfgGetList = 685;
internal const int cmdidTaskListCustomView47 = 724;
internal const int cmdidTaskListCustomView48 = 725;
internal const int cmdidTaskListCustomView49 = 726;
- internal const int cmdidTaskListCustomView50 = 727;//not used on purpose, ends the list
+ internal const int cmdidTaskListCustomView50 = 727; //not used on purpose, ends the list
internal const int cmdidObjectSearch = 728;
internal const int cmdidTaggedExp8 = 767;
internal const int cmdidTaggedExp9 = 768;
- internal const int cmdidEditorWidgetClick = 769;// param = 0;is the moniker as VT_BSTR, param = 1;is the buffer line as VT_I4, and param = 2;is the buffer index as VT_I4
+ internal const int cmdidEditorWidgetClick = 769; // param = 0;is the moniker as VT_BSTR, param = 1;is the buffer line as VT_I4, and param = 2;is the buffer index as VT_I4
internal const int cmdidCmdWinUpdateAC = 770;
internal const int cmdidSlnCfgMgr = 771;
internal const int cmdidAutoHideContext30 = 805;
internal const int cmdidAutoHideContext31 = 806;
internal const int cmdidAutoHideContext32 = 807;
- internal const int cmdidAutoHideContext33 = 808;// must remain unused
+ internal const int cmdidAutoHideContext33 = 808; // must remain unused
internal const int cmdidShellNavBackward = 809;
internal const int cmdidShellNavForward = 810;
internal const int cmdidShellNavigate30 = 840;
internal const int cmdidShellNavigate31 = 841;
internal const int cmdidShellNavigate32 = 842;
- internal const int cmdidShellNavigate33 = 843;// must remain unused
+ internal const int cmdidShellNavigate33 = 843; // must remain unused
internal const int cmdidShellWindowNavigate1 = 844;
internal const int cmdidShellWindowNavigate2 = 845;
internal const int cmdidShellWindowNavigate30 = 873;
internal const int cmdidShellWindowNavigate31 = 874;
internal const int cmdidShellWindowNavigate32 = 875;
- internal const int cmdidShellWindowNavigate33 = 876;// must remain unused
+ internal const int cmdidShellWindowNavigate33 = 876; // must remain unused
// ObjectSearch cmds
internal const int cmdidOBSDoFind = 877;
internal const int cmdidMRUFile22 = 921;
internal const int cmdidMRUFile23 = 922;
internal const int cmdidMRUFile24 = 923;
- internal const int cmdidMRUFile25 = 924;// note cmdidMRUFile25 is unused on purpose!
+ internal const int cmdidMRUFile25 = 924; // note cmdidMRUFile25 is unused on purpose!
// Object Browsing & ClassView cmds
// Shared shell cmds (for accessing Object Browsing functionality)
internal const int cmdidCVShowPackages = 953;
internal const int cmdidQryManageIndexes = 954;
internal const int cmdidBrowseComponent = 955;
- internal const int cmdidPrintDefault = 956;// quick print
+ internal const int cmdidPrintDefault = 956; // quick print
internal const int cmdidBrowseDoc = 957;
throw new ConfigurationErrorsException(SR.EncryptedNode_not_found, filename, lineNumber);
// Find the <EncryptedData> node
- for (;;)
+ while (true)
{
clone.Read(); // Keep reading till we find a relavant node
if (reader.Name != name)
throw new ConfigurationErrorsException(SR.Format(SR.Config_unexpected_element_name, reader.Name));
- for (;;)
+ while (true)
{
if (!reader.Read())
{
}
set
{
- for (;;)
+ while (true)
{
int oldData = _data;
int newData;
public abstract string ConvertObjectToXml(object value);
public virtual void ConvertObjectToXml(object value, XmlWriter xmlWriter, XmlRootAttribute xmlAttrib)
{
- xmlWriter.WriteString(ConvertObjectToXml(value));// should it be NO OP?
+ xmlWriter.WriteString(ConvertObjectToXml(value)); // should it be NO OP?
}
public static DataStorage CreateStorage(DataColumn column, Type dataType, StorageType typeCode)
{
return _values[records[0]];
}
- return null;// no data => null
+ return null; // no data => null
case AggregateType.Count:
count = 0;
{
return _values[records[0]];
}
- return null;// no data => null
+ return null; // no data => null
case AggregateType.Count:
int count = 0;
{
return _values[records[0]];
}
- return null;// no data => null
+ return null; // no data => null
case AggregateType.Count:
int count = 0;
{
return _values[records[0]];
}
- return null;// no data => null
+ return null; // no data => null
case AggregateType.Count:
int count = 0;
{
return _values[records[0]];
}
- return null;// no data => null
+ return null; // no data => null
case AggregateType.Count:
count = 0;
{
return _values[records[0]];
}
- return null;// no data => null
+ return null; // no data => null
case AggregateType.Count:
count = 0;
{
return _values[records[0]];
}
- return null;// no data => null
+ return null; // no data => null
case AggregateType.Count:
count = 0;
// there is a change, since we are supporting hierarchy(bacause of Names Simple Type) old check (just one leel base check) is wrong
if (value != null && value.CanHaveMaxLength())
{
- _maxLength = _simpleType.MaxLength;// this is temp solution, since we dont let simple content to have
+ _maxLength = _simpleType.MaxLength; // this is temp solution, since we dont let simple content to have
}
//maxlength set but for simple type we want to set it, after coming to decision about it , we should
clone.DataType = DataType;
clone._defaultValue = _defaultValue;
clone._defaultValueIsNull = ((_defaultValue == DBNull.Value) || (clone.ImplementsINullable && DataStorage.IsObjectSqlNull(_defaultValue))) ? true : false;
- clone._columnMapping = _columnMapping;// clone column Mapping since we dont let MaxLength to be set throu API
+ clone._columnMapping = _columnMapping; // clone column Mapping since we dont let MaxLength to be set throu API
clone._readOnly = _readOnly;
clone.MaxLength = MaxLength;
clone.XmlDataType = XmlDataType;
public override void ResetValue(object component)
{
DataRowView dataRowView = (DataRowView)component;
- dataRowView.SetColumnValue(Column, DBNull.Value);// no need to ccheck for the col type and set Sql...Null!
+ dataRowView.SetColumnValue(Column, DBNull.Value); // no need to ccheck for the col type and set Sql...Null!
}
public override void SetValue(object component, object value)
return row;
}
}
- return null;// Rule 1: At all times, only ONE FK "(in a row) can be non-Null
+ return null; // Rule 1: At all times, only ONE FK "(in a row) can be non-Null
}
// No Nested in 1-many
ForeignKeyConstraint foreign = constraints[j] as ForeignKeyConstraint;
if (foreign.Table == foreign.RelatedTable)
{
- continue;// we have already added this foreign key in while cloning the datatable
+ continue; // we have already added this foreign key in while cloning the datatable
}
ds.Tables[i].Constraints.Add(constraints[j].Clone(ds));
//Constraints
if (isSingleTable)
{
- DeserializeConstraints(info, context, /*table index */ 0, /* serialize all constraints */false);// since single table, send table index as 0, meanwhile passing
+ DeserializeConstraints(info, context, /*table index */ 0, /* serialize all constraints */false); // since single table, send table index as 0, meanwhile passing
// false for 'allConstraints' means, handle all the constraint related to the table
}
}
ArrayList storeList = (ArrayList)info.GetValue(string.Format(formatProvider, "DataTable_{0}.Records", serIndex), typeof(ArrayList));
ArrayList nullbitList = (ArrayList)info.GetValue(string.Format(formatProvider, "DataTable_{0}.NullBits", serIndex), typeof(ArrayList));
Hashtable rowErrors = (Hashtable)info.GetValue(string.Format(formatProvider, "DataTable_{0}.RowErrors", serIndex), typeof(Hashtable));
- rowErrors.OnDeserialization(this);//OnDeSerialization must be called since the hashtable gets deserialized after the whole graph gets deserialized
+ rowErrors.OnDeserialization(this); //OnDeSerialization must be called since the hashtable gets deserialized after the whole graph gets deserialized
Hashtable colErrors = (Hashtable)info.GetValue(string.Format(formatProvider, "DataTable_{0}.ColumnErrors", serIndex), typeof(Hashtable));
- colErrors.OnDeserialization(this);//OnDeSerialization must be called since the hashtable gets deserialized after the whole graph gets deserialized
+ colErrors.OnDeserialization(this); //OnDeSerialization must be called since the hashtable gets deserialized after the whole graph gets deserialized
if (recordCount <= 0)
{
int numIndexes = _shadowIndexes.Count;
for (int i = 0; i < numIndexes; i++)
{
- Index ndx = _shadowIndexes[i];// shadowindexes may change, see ShadowIndexCopy()
+ Index ndx = _shadowIndexes[i]; // shadowindexes may change, see ShadowIndexCopy()
try
{
if (forceReset || ndx.HasRemoteAggregate)
DataTable parentTable = nestedRelations[j].ParentTable;
if (!visitedTables.Contains(parentTable))
visitedTables.Add(parentTable);
- return parentTable.GetInheritedNamespace(visitedTables);// this is the same as return parentTable.Namespace
+ return parentTable.GetInheritedNamespace(visitedTables); // this is the same as return parentTable.Namespace
}
} // dont put else
}
finally
{
- row.ResetLastChangedColumn();// if expression is evaluated while adding, before return, we want to clear it
+ row.ResetLastChangedColumn(); // if expression is evaluated while adding, before return, we want to clear it
}
}
int numIndexes = _shadowIndexes.Count;
for (int i = 0; i < numIndexes; i++)
{
- Index ndx = _shadowIndexes[i];// shadowindexes may change, see ShadowIndexCopy()
+ Index ndx = _shadowIndexes[i]; // shadowindexes may change, see ShadowIndexCopy()
if (0 < ndx.RefCount)
{
ndx.RecordChanged(record);
int numIndexes = _shadowIndexes.Count;
for (int i = 0; i < numIndexes; i++)
{
- Index ndx = _shadowIndexes[i];// shadowindexes may change, see ShadowIndexCopy()
+ Index ndx = _shadowIndexes[i]; // shadowindexes may change, see ShadowIndexCopy()
if (0 < ndx.RefCount)
{
ndx.RecordChanged(oldIndex[i], newIndex[i]);
int numIndexes = _shadowIndexes.Count;
for (int i = 0; i < numIndexes; i++)
{
- Index ndx = _shadowIndexes[i];// shadowindexes may change, see ShadowIndexCopy()
+ Index ndx = _shadowIndexes[i]; // shadowindexes may change, see ShadowIndexCopy()
if (0 < ndx.RefCount)
{
ndx.RecordStateChanged(record, oldState, newState);
int numIndexes = _shadowIndexes.Count;
for (int i = 0; i < numIndexes; i++)
{
- Index ndx = _shadowIndexes[i];// shadowindexes may change, see ShadowIndexCopy()
+ Index ndx = _shadowIndexes[i]; // shadowindexes may change, see ShadowIndexCopy()
if (0 < ndx.RefCount)
{
if (record1 != -1 && record2 != -1)
// if expression has changed
if (!equalValues)
{
- int[] oldIndex = dr.Table.RemoveRecordFromIndexes(dr, version);// conditional, if it exists it will try to remove with no event fired
+ int[] oldIndex = dr.Table.RemoveRecordFromIndexes(dr, version); // conditional, if it exists it will try to remove with no event fired
dc.SetValue(record, newValue);
- int[] newIndex = dr.Table.InsertRecordToIndexes(dr, version);// conditional, it will insert if it qualifies, no event will be fired
+ int[] newIndex = dr.Table.InsertRecordToIndexes(dr, version); // conditional, it will insert if it qualifies, no event will be fired
if (dr.HasVersion(version))
{
if (version != DataRowVersion.Original)
int numIndexes = _shadowIndexes.Count;
for (int i = 0; i < numIndexes; i++)
{
- Index ndx = _shadowIndexes[i];// shadowindexes may change, see ShadowIndexCopy()
+ Index ndx = _shadowIndexes[i]; // shadowindexes may change, see ShadowIndexCopy()
if (0 < ndx.RefCount)
{
if (null == column)
if (_inDataLoad && !AreIndexEventsSuspended)
{
// we do not want to fire any listchanged in new Load/Fill
- SuspendIndexEvents();// so suspend events here(not suspended == table already has some rows initially)
+ SuspendIndexEvents(); // so suspend events here(not suspended == table already has some rows initially)
}
- DataRow dataRow = LoadRow(values, loadOption, indextoUse);// if indextoUse == null, it means we dont have PK,
+ DataRow dataRow = LoadRow(values, loadOption, indextoUse); // if indextoUse == null, it means we dont have PK,
// so LoadRow will take care of just adding the row to end
return dataRow;
}
DataSet ds = null;
- string tablenamespace = _tableNamespace;//SQL BU Defect Tracking 286968
+ string tablenamespace = _tableNamespace; //SQL BU Defect Tracking 286968
// Generate SchemaTree and write it out
if (null == DataSet)
internal const int EqualTo = 7; // =
internal const int GreaterThen = 8; // >
internal const int LessThen = 9; // <
- internal const int GreaterOrEqual = 10;// >=
+ internal const int GreaterOrEqual = 10; // >=
internal const int LessOrEqual = 11; // <=
internal const int NotEqual = 12; // <>
/* End of Comparison (relational) operators */
}
else
{
- iDest = destination.Tables.IndexOf(RelatedTable.TableName, RelatedTable.Namespace, false);// pass false for last param
+ iDest = destination.Tables.IndexOf(RelatedTable.TableName, RelatedTable.Namespace, false); // pass false for last param
}
if (iDest < 0)
{
_IgnoreNSforTableLookup = (_dataSet._namespaceURI != source._namespaceURI); // if two DataSets have different
// Namespaces, ignore NS for table lookups as we won't be able to find the right tables which inherits its NS
- List<DataColumn> existingColumns = null;// need to cache existing columns
+ List<DataColumn> existingColumns = null; // need to cache existing columns
if (MissingSchemaAction.Add == _missingSchemaAction)
{
}
else
{
- targetTable = _dataSet.Tables[sourceTable.TableName, sourceTable.Namespace];// we know that target table won't be null since MissingSchemaAction is Add , we have already added it!
+ targetTable = _dataSet.Tables[sourceTable.TableName, sourceTable.Namespace]; // we know that target table won't be null since MissingSchemaAction is Add , we have already added it!
}
foreach (DataColumn dc in sourceTable.Columns)
//the decimal digits, from the
//lowest significant to highest significant
- int iDigits = 0;//Number of significant digits
+ int iDigits = 0; //Number of significant digits
uint ulRem; //Remainder of a division by x_ulBase10, i.e.,least significant digit
// Build the final numeric string by inserting the sign, reversing
lScaleAdjust = ResScale - ActualScale;
- fResPositive = (x.IsPositive == y.IsPositive);//positive if both signs same.
+ fResPositive = (x.IsPositive == y.IsPositive); //positive if both signs same.
// II) Perform multiplication
dwlNextAccum = 0;
// Update result and accum
- rgulRes[idRes++] = unchecked((uint)dwlAccum);// & x_ulInt32BaseForMod); // equiv to mod x_lInt32Base
+ rgulRes[idRes++] = unchecked((uint)dwlAccum); // & x_ulInt32BaseForMod); // equiv to mod x_lInt32Base
dwlAccum = (dwlAccum >> 32) + dwlNextAccum; // equiv to div BaseUI4 + dwlNAccum
// dwlNextAccum can't overflow next iteration
throw new DivideByZeroException(SQLResource.DivideByZeroMessage);
// 1) Figure out result prec,scale,sign..
- fResSignPos = (x.IsPositive == y.IsPositive);//sign of result
+ fResSignPos = (x.IsPositive == y.IsPositive); //sign of result
//scale = max(s1 + p2 + 1, x_cNumeDivScaleMin);
//precision = max(s1 + p2 + 1, x_cNumeDivScaleMin) + p1 + p2 + 1;
SqlDecimal ret = n;
- int lScaleAdjust = scale - ret._bScale;//Adjustment to scale
+ int lScaleAdjust = scale - ret._bScale; //Adjustment to scale
//Adjust scale
ret.AdjustScale(lScaleAdjust, true);
if (_candidateColumns[i] != null)
{
ndxFields[j++] = new IndexField(_table.Columns[i], isDescending: false);
- _candidateColumns[i].flag = false;// this means it is processed
+ _candidateColumns[i].flag = false; // this means it is processed
}
}
for (i = 0; i < lenIndexDesc; i++)
{
if (_candidateColumns[i] != null)
{
- _candidateColumns[i].flag = false;// same as before, it is false when it returns
+ _candidateColumns[i].flag = false; // same as before, it is false when it returns
}
}
{
if (_candidateColumns[i] != null)
{
- _candidateColumns[i].flag = false;// same as before, it is false when it returns
+ _candidateColumns[i].flag = false; // same as before, it is false when it returns
}
}
}
if (_baseSimpleType != null && _baseSimpleType.Name != null && _baseSimpleType.Name.Length > 0)
{
- _xmlBaseType = _baseSimpleType.XmlBaseType;// SimpleTypeQualifiedName;
+ _xmlBaseType = _baseSimpleType.XmlBaseType; // SimpleTypeQualifiedName;
}
else
{
}
else
{
- iDest = destination.Tables.IndexOf(Table.TableName, Table.Namespace, false);// pass false for last param to be backward compatable
+ iDest = destination.Tables.IndexOf(Table.TableName, Table.Namespace, false); // pass false for last param to be backward compatable
}
if (iDest < 0)
row.Read(); // consume the current node
row.Read(); // now points to the next column
//SkipWhitespaces(row); seems no need, just in case if we see other issue , this will be here as hint
- continue;// add a read here!
+ continue; // add a read here!
}
if (column.IsCustomType)
if (items == null)
return false; // empty element, threat it as table
- bool isChoice = FromInference && (pt is XmlSchemaChoice);// currently we add this support for choice, just for inference
+ bool isChoice = FromInference && (pt is XmlSchemaChoice); // currently we add this support for choice, just for inference
foreach (XmlSchemaAnnotated el in items)
if (relation == null)
{
- tableChildren.Add(child);// how about prefix for this?
+ tableChildren.Add(child); // how about prefix for this?
if (FromInference && table.UKColumnPositionForInference == -1)
{ // this is done for Inference
int ukColumnPosition = -1;
DataColumn parentKey;
if (FromInference)
{
- int position = table.UKColumnPositionForInference;// we keep posiotion of unique key column here, for inference
+ int position = table.UKColumnPositionForInference; // we keep posiotion of unique key column here, for inference
if (position == -1)
foreach (DataColumn dc in table.Columns)
{
{
// this means UDSimpleType
strType = node.QualifiedName.ToString(); // use qualifed name
- type = ParseDataType(node.QualifiedName.ToString());// search with QName
+ type = ParseDataType(node.QualifiedName.ToString()); // search with QName
}
else
{
{
return; // backward compatability
}
- column = new DataColumn(columnName, type, null, MappingType.Element);// this is to fix issue with Exception we used to throw for old inference engine if column
+ column = new DataColumn(columnName, type, null, MappingType.Element); // this is to fix issue with Exception we used to throw for old inference engine if column
//exists with different namespace; while adding it to columncollection
isToAdd = true;
}
{
xmlWriter.Flush();
}
- return;// rootSchema;
+ return; // rootSchema;
}
internal XmlElement SchemaTree(XmlDocument xd, DataTable dt)
private NameValuePermission[] _tree; // with branches
- internal static readonly NameValuePermission Default = null;// = new NameValuePermission(String.Empty, new string[] { "File Name" }, KeyRestrictionBehavior.AllowOnly);
+ internal static readonly NameValuePermission Default = null; // = new NameValuePermission(String.Empty, new string[] { "File Name" }, KeyRestrictionBehavior.AllowOnly);
internal NameValuePermission()
{ // root node
// new stack to old stack.
if (_waitHandles.PoolSemaphore.WaitOne(0))
{
- for (;;)
+ while (true)
{
DbConnectionInternal obj;
private static readonly Regex ConnectionStringRegexOdbc = new Regex(ConnectionStringPatternOdbc, RegexOptions.ExplicitCapture | RegexOptions.Compiled);
private static readonly Regex ConnectionStringValidValueRegex = new Regex("^[^\u0000]*$", RegexOptions.Compiled); // value not allowed to contain embedded null
#endif
- private static readonly Regex ConnectionStringValidKeyRegex = new Regex("^(?![;\\s])[^\\p{Cc}]+(?<!\\s)$", RegexOptions.Compiled);// key not allowed to start with semi-colon or space or contain non-visible characters or end with space
+ private static readonly Regex ConnectionStringValidKeyRegex = new Regex("^(?![;\\s])[^\\p{Cc}]+(?<!\\s)$", RegexOptions.Compiled); // key not allowed to start with semi-colon or space or contain non-visible characters or end with space
internal const string DataDirectory = "|datadirectory|";
DisposeOpenResults();
_hasRows = false;
- for (; ; )
+ while (true)
{
Debug.Assert(null == _irow, "NextResult: row loop check");
Debug.Assert(null == _irowset, "NextResult: rowset loop check");
// new stack to old stack.
if (_waitHandles.PoolSemaphore.WaitOne(0, false) /* != WAIT_TIMEOUT */)
{
- for (; ; )
+ while (true)
{
DbConnectionInternal obj;
}
else
{
- Debug.Assert(null == _warnings || 0 != _warnings.Count, "empty warning collection?");// must be something in the collection
+ Debug.Assert(null == _warnings || 0 != _warnings.Count, "empty warning collection?"); // must be something in the collection
if (!ignoreWarnings)
{
internal static readonly SmiMetaData DefaultBigInt = new SmiMetaData(SqlDbType.BigInt, 8, 19, 0, SqlCompareOptions.None); // SqlDbType.BigInt
internal static readonly SmiMetaData DefaultBinary = new SmiMetaData(SqlDbType.Binary, 1, 0, 0, SqlCompareOptions.None); // SqlDbType.Binary
internal static readonly SmiMetaData DefaultBit = new SmiMetaData(SqlDbType.Bit, 1, 1, 0, SqlCompareOptions.None); // SqlDbType.Bit
- internal static readonly SmiMetaData DefaultChar_NoCollation = new SmiMetaData(SqlDbType.Char, 1, 0, 0, DefaultStringCompareOptions);// SqlDbType.Char
+ internal static readonly SmiMetaData DefaultChar_NoCollation = new SmiMetaData(SqlDbType.Char, 1, 0, 0, DefaultStringCompareOptions); // SqlDbType.Char
internal static readonly SmiMetaData DefaultDateTime = new SmiMetaData(SqlDbType.DateTime, 8, 23, 3, SqlCompareOptions.None); // SqlDbType.DateTime
internal static readonly SmiMetaData DefaultDecimal = new SmiMetaData(SqlDbType.Decimal, 9, 18, 0, SqlCompareOptions.None); // SqlDbType.Decimal
internal static readonly SmiMetaData DefaultFloat = new SmiMetaData(SqlDbType.Float, 8, 53, 0, SqlCompareOptions.None); // SqlDbType.Float
internal static readonly SmiMetaData DefaultImage = new SmiMetaData(SqlDbType.Image, UnlimitedMaxLengthIndicator, 0, 0, SqlCompareOptions.None); // SqlDbType.Image
internal static readonly SmiMetaData DefaultInt = new SmiMetaData(SqlDbType.Int, 4, 10, 0, SqlCompareOptions.None); // SqlDbType.Int
internal static readonly SmiMetaData DefaultMoney = new SmiMetaData(SqlDbType.Money, 8, 19, 4, SqlCompareOptions.None); // SqlDbType.Money
- internal static readonly SmiMetaData DefaultNChar_NoCollation = new SmiMetaData(SqlDbType.NChar, 1, 0, 0, DefaultStringCompareOptions);// SqlDbType.NChar
- internal static readonly SmiMetaData DefaultNText_NoCollation = new SmiMetaData(SqlDbType.NText, UnlimitedMaxLengthIndicator, 0, 0, DefaultStringCompareOptions);// SqlDbType.NText
- internal static readonly SmiMetaData DefaultNVarChar_NoCollation = new SmiMetaData(SqlDbType.NVarChar, MaxUnicodeCharacters, 0, 0, DefaultStringCompareOptions);// SqlDbType.NVarChar
+ internal static readonly SmiMetaData DefaultNChar_NoCollation = new SmiMetaData(SqlDbType.NChar, 1, 0, 0, DefaultStringCompareOptions); // SqlDbType.NChar
+ internal static readonly SmiMetaData DefaultNText_NoCollation = new SmiMetaData(SqlDbType.NText, UnlimitedMaxLengthIndicator, 0, 0, DefaultStringCompareOptions); // SqlDbType.NText
+ internal static readonly SmiMetaData DefaultNVarChar_NoCollation = new SmiMetaData(SqlDbType.NVarChar, MaxUnicodeCharacters, 0, 0, DefaultStringCompareOptions); // SqlDbType.NVarChar
internal static readonly SmiMetaData DefaultReal = new SmiMetaData(SqlDbType.Real, 4, 24, 0, SqlCompareOptions.None); // SqlDbType.Real
internal static readonly SmiMetaData DefaultUniqueIdentifier = new SmiMetaData(SqlDbType.UniqueIdentifier, 16, 0, 0, SqlCompareOptions.None); // SqlDbType.UniqueIdentifier
internal static readonly SmiMetaData DefaultSmallDateTime = new SmiMetaData(SqlDbType.SmallDateTime, 4, 16, 0, SqlCompareOptions.None); // SqlDbType.SmallDateTime
internal static readonly SmiMetaData DefaultSmallInt = new SmiMetaData(SqlDbType.SmallInt, 2, 5, 0, SqlCompareOptions.None); // SqlDbType.SmallInt
internal static readonly SmiMetaData DefaultSmallMoney = new SmiMetaData(SqlDbType.SmallMoney, 4, 10, 4, SqlCompareOptions.None); // SqlDbType.SmallMoney
- internal static readonly SmiMetaData DefaultText_NoCollation = new SmiMetaData(SqlDbType.Text, UnlimitedMaxLengthIndicator, 0, 0, DefaultStringCompareOptions);// SqlDbType.Text
+ internal static readonly SmiMetaData DefaultText_NoCollation = new SmiMetaData(SqlDbType.Text, UnlimitedMaxLengthIndicator, 0, 0, DefaultStringCompareOptions); // SqlDbType.Text
internal static readonly SmiMetaData DefaultTimestamp = new SmiMetaData(SqlDbType.Timestamp, 8, 0, 0, SqlCompareOptions.None); // SqlDbType.Timestamp
internal static readonly SmiMetaData DefaultTinyInt = new SmiMetaData(SqlDbType.TinyInt, 1, 3, 0, SqlCompareOptions.None); // SqlDbType.TinyInt
internal static readonly SmiMetaData DefaultVarBinary = new SmiMetaData(SqlDbType.VarBinary, MaxBinaryLength, 0, 0, SqlCompareOptions.None); // SqlDbType.VarBinary
- internal static readonly SmiMetaData DefaultVarChar_NoCollation = new SmiMetaData(SqlDbType.VarChar, MaxANSICharacters, 0, 0, DefaultStringCompareOptions);// SqlDbType.VarChar
+ internal static readonly SmiMetaData DefaultVarChar_NoCollation = new SmiMetaData(SqlDbType.VarChar, MaxANSICharacters, 0, 0, DefaultStringCompareOptions); // SqlDbType.VarChar
internal static readonly SmiMetaData DefaultVariant = new SmiMetaData(SqlDbType.Variant, 8016, 0, 0, SqlCompareOptions.None); // SqlDbType.Variant
- internal static readonly SmiMetaData DefaultXml = new SmiMetaData(SqlDbType.Xml, UnlimitedMaxLengthIndicator, 0, 0, DefaultStringCompareOptions);// SqlDbType.Xml
+ internal static readonly SmiMetaData DefaultXml = new SmiMetaData(SqlDbType.Xml, UnlimitedMaxLengthIndicator, 0, 0, DefaultStringCompareOptions); // SqlDbType.Xml
internal static readonly SmiMetaData DefaultUdt_NoType = new SmiMetaData(SqlDbType.Udt, 0, 0, 0, SqlCompareOptions.None); // SqlDbType.Udt
internal static readonly SmiMetaData DefaultStructured = new SmiMetaData(SqlDbType.Structured, 0, 0, 0, SqlCompareOptions.None); // SqlDbType.Structured
internal static readonly SmiMetaData DefaultDate = new SmiMetaData(SqlDbType.Date, 3, 10, 0, SqlCompareOptions.None); // SqlDbType.Date
// new stack to old stack.
if (_waitHandles.PoolSemaphore.WaitOne(0))
{
- for (; ;)
+ while (true)
{
DbConnectionInternal obj;
private static readonly object s_dllLock = new object();
- private const uint const_LOCALDB_TRUNCATE_ERR_MESSAGE = 1;// flag for LocalDBFormatMessage that indicates that message can be truncated if it does not fit in the buffer
- private const int const_ErrorMessageBufferSize = 1024; // Buffer size for Local DB error message 1K will be enough for all messages
+ private const uint const_LOCALDB_TRUNCATE_ERR_MESSAGE = 1; // flag for LocalDBFormatMessage that indicates that message can be truncated if it does not fit in the buffer
+ private const int const_ErrorMessageBufferSize = 1024; // Buffer size for Local DB error message 1K will be enough for all messages
internal static string GetLocalDBMessage(int hrCode)
{
WriteUnsignedLong(TdsEnums.SQL_PLP_NULL, stateObj); // PLP Null.
}
- return null;//continue; // End of UDT - continue to next parameter.
+ return null; //continue; // End of UDT - continue to next parameter.
}
else if (mt.IsPlp)
{
private readonly TdsParserStateObject _stateObj; // target to write to
private readonly SmiMetaData _metaData; // metadata describing value
private readonly bool _isPlp; // should this column be sent in PLP format?
- private bool _plpUnknownSent;// did we send initial UNKNOWN_LENGTH marker?
+ private bool _plpUnknownSent; // did we send initial UNKNOWN_LENGTH marker?
private Encoder _encoder; // required for chunking character type data
private SmiMetaData _variantType; // required for sql_variant
#if DEBUG
public void Dispose()
{
// TO keep this lock free and easy to analyze, the linked list is READ ONLY. Thus we copy
- for (; ; )
+ while (true)
{
DiagnosticSubscription subscriptions = Owner._subscriptions;
DiagnosticSubscription newSubscriptions = Remove(subscriptions, this); // Make a new list, with myself removed.
// Points just beyond the last point in the string that has yet to be parsed. Thus we start with the whole string.
int endIdx = filterAndPayloadSpecs.Length;
- for (;;)
+ while (true)
{
// Skip trailing whitespace.
while (0 < endIdx && char.IsWhiteSpace(filterAndPayloadSpecs[endIdx - 1]))
// Parse all the explicit transforms, if present
if (startTransformIdx < endIdx)
{
- for (;;)
+ while (true)
{
int specStartIdx = startTransformIdx;
int semiColonIdx = filterAndPayloadSpec.LastIndexOf(';', endIdx - 1, endIdx - startTransformIdx);
CategoryEntry* currentCategoryPointer = firstCategoryPointer;
CategoryEntry* previousCategoryPointer = firstCategoryPointer;
- for (; ; )
+ while (true)
{
if (currentCategoryPointer->IsConsistent == 0)
Verify(currentCategoryPointer);
{
CounterEntry* currentCounterPointer = (CounterEntry*)(ResolveOffset(instancePointer->FirstCounterOffset, s_counterEntrySize));
CounterEntry* previousCounterPointer = currentCounterPointer;
- for (; ; )
+ while (true)
{
if (currentCounterPointer->CounterNameHashCode == counterNameHashCode)
{
try
{
- for (; ; )
+ while (true)
{
bool verifiedLifetimeOfThisInstance = false;
if (verifyLifeTime && (currentInstancePointer->RefCount != 0))
// 2nd pass find a free instance slot
InstanceEntry* currentInstancePointer = (InstanceEntry*)(ResolveOffset(categoryPointer->FirstInstanceOffset, s_instanceEntrySize));
InstanceEntry* previousInstancePointer = currentInstancePointer;
- for (; ; )
+ while (true)
{
if (currentInstancePointer->RefCount == 0)
{
try
{
NetFrameworkUtils.EnterMutexWithoutGlobal(_categoryData.MutexName, ref mutex);
- for (; ; )
+ while (true)
{
RemoveOneInstance(instancePointer, true);
IntPtr[] moduleHandles = new IntPtr[64];
GCHandle moduleHandlesArrayHandle = new GCHandle();
int moduleCount = 0;
- for (;;)
+ while (true)
{
bool enumResult = false;
try
{
int[] processIds = new int[256];
int size;
- for (; ; )
+ while (true)
{
if (!Interop.Kernel32.EnumProcesses(processIds, processIds.Length * 4, out size))
throw new Win32Exception();
private static void Sleep(int minMSec)
{
var startTime = DateTime.UtcNow;
- for (; ; )
+ while (true)
{
DateTime endTime = DateTime.UtcNow;
double delta = (endTime - startTime).TotalMilliseconds;
if (serverName.EndsWith("]"))
{
//[IPv6]
- serverName = serverName.Substring(1, serverName.Length - 2);//2 for []
+ serverName = serverName.Substring(1, serverName.Length - 2); //2 for []
return serverName;
}
int closingBrace = serverName.LastIndexOf("]:");
// dealing with function *'s and what not - so we make explicit calls
// to gdi+ after the fact, via the GdiplusNotificationHook and
// GdiplusNotificationUnhook methods.
- public IntPtr hook;//not used
- public IntPtr unhook;//not used.
+ public IntPtr hook; //not used
+ public IntPtr unhook; //not used.
}
}
}
// Loop invariant: everything to the left of "left" is a valid reference,
// and anything to the right of "right" is broken.
- for (;;)
+ while (true)
{
while (left < length && list[left].Target != null)
left++;
[StructLayout(LayoutKind.Sequential)]
internal struct BITMAPINFO_FLAT
{
- public int bmiHeader_biSize;// = Marshal.SizeOf(typeof(BITMAPINFOHEADER));
+ public int bmiHeader_biSize; // = Marshal.SizeOf(typeof(BITMAPINFOHEADER));
public int bmiHeader_biWidth;
public int bmiHeader_biHeight;
public short bmiHeader_biPlanes;
private bool PrintLoop(PrintDocument document)
{
QueryPageSettingsEventArgs queryEvent = new QueryPageSettingsEventArgs((PageSettings)document.DefaultPageSettings.Clone());
- for (;;)
+ while (true)
{
document._OnQueryPageSettings(queryEvent);
if (queryEvent.Cancel)
PrintPageEventArgs pageEvent = null;
PageSettings documentPageSettings = (PageSettings)document.DefaultPageSettings.Clone();
QueryPageSettingsEventArgs queryEvent = new QueryPageSettingsEventArgs(documentPageSettings);
- for (;;)
+ while (true)
{
queryEvent.PageSettingsChanged = false;
document._OnQueryPageSettings(queryEvent);
cancellationToken.ThrowIfCancellationRequested();
buffer = ArrayPool<char>.Shared.Rent(sr.CurrentEncoding.GetMaxCharCount(DefaultBufferSize));
StringBuilder sb = new StringBuilder();
- for (;;)
+ while (true)
{
#if MS_IO_REDIST
int read = await sr.ReadAsync(buffer, 0, buffer.Length).ConfigureAwait(false);
// left most node each iteration.
var stack = new Stack<BindingRestrictions>();
BindingRestrictions top = this;
- for (;;)
+ while (true)
{
var m = top as MergedRestriction;
if (m != null)
// left most node each iteration.
var stack = new Stack<BindingRestrictions>();
BindingRestrictions top = _node;
- for (;;)
+ while (true)
{
var m = top as MergedRestriction;
if (m != null)
rule = null;
var args = new object[] { arg0 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3, arg4 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3, arg4 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
rule = null;
var args = new object[] { arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 };
- for (; ; )
+ while (true)
{
@this.Target = originalRule;
rule = @this.Target = @this.Binder.BindCore(@this, args);
// This method catches the cases that were incorrectly disallowed, but when it needs to
// examine possible conversions of element or type parameters it applies stricter rules.
- for (;;)
+ while (true)
{
if (!skipNonArray) // Skip if we just came from HasReferenceConversionTo and have just tested these
{
private void EmitSwitchBuckets(SwitchInfo info, List<List<SwitchLabel>> buckets, int first, int last)
{
- for (;;)
+ while (true)
{
if (first == last)
{
Assert.Equal(ExpressionType.AndAlso, vExp.NodeType);
Stack<Expression> toSplit = new Stack<Expression>();
- for (;;)
+ while (true)
{
if (vExp.NodeType == ExpressionType.AndAlso)
{
bool ParseOptionalCustomModsOrConstraint()
{
- for (;;)
+ while (true)
{
if (pbCur >= pbEnd)
return true;
bool ParseOptionalCustomMods()
{
- for (;;)
+ while (true)
{
if (pbCur >= pbEnd)
return true;
ppQualSet = null;
else
ppQualSet = new IWbemQualifierSetFreeThreaded(pQualSet);
- GC.KeepAlive ( this ) ;
+ GC.KeepAlive(this);
return hResult;
}
public int Get_(string wszName, int lFlags, ref object pVal, ref int pType, ref int plFlavor)
pVal = DBNull.Value;
}
}
- GC.KeepAlive ( this ) ;
+ GC.KeepAlive(this);
return hr;
}
public int Put_(string wszName, int lFlags, ref object pVal, int Type)
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.Put_f(5, pWbemClassObject, wszName, lFlags, ref pVal, Type);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int Delete_(string wszName)
{
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.Delete_f(6, pWbemClassObject, wszName);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int GetNames_(string wszQualifierName, int lFlags, ref object pQualifierVal, out string[] pNames)
{
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.GetNames_f(7, pWbemClassObject, wszQualifierName, lFlags, ref pQualifierVal, out pNames);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int BeginEnumeration_(int lEnumFlags)
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.BeginEnumeration_f(8, pWbemClassObject, lEnumFlags);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int Next_(int lFlags, ref string strName, ref object pVal, ref int pType, ref int plFlavor)
{
pVal = null;
strName = null;
int res = WmiNetUtilsHelper.Next_f(9, pWbemClassObject, lFlags, ref strName, ref pVal, ref pType, ref plFlavor);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int EndEnumeration_()
{
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.EndEnumeration_f(10, pWbemClassObject);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int GetPropertyQualifierSet_(string wszProperty, out IWbemQualifierSetFreeThreaded ppQualSet)
{
else
ppQualSet = new IWbemQualifierSetFreeThreaded(pQualSet);
- GC.KeepAlive ( this ) ;
+ GC.KeepAlive(this);
return hResult;
}
public int Clone_(out IWbemClassObjectFreeThreaded ppCopy)
else
ppCopy = new IWbemClassObjectFreeThreaded(pWbemClassObjectNew);
- GC.KeepAlive ( this ) ;
+ GC.KeepAlive(this);
return hResult;
}
public int GetObjectText_(int lFlags, out string pstrObjectText)
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.GetObjectText_f(13, pWbemClassObject, lFlags, out pstrObjectText);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int SpawnDerivedClass_(int lFlags, out IWbemClassObjectFreeThreaded ppNewClass)
{
else
ppNewClass = new IWbemClassObjectFreeThreaded(pWbemClassObjectNew);
- GC.KeepAlive ( this ) ;
+ GC.KeepAlive(this);
return hResult;
}
public int SpawnInstance_(int lFlags, out IWbemClassObjectFreeThreaded ppNewInstance)
else
ppNewInstance = new IWbemClassObjectFreeThreaded(pWbemClassObjectNew);
- GC.KeepAlive ( this ) ;
+ GC.KeepAlive(this);
return hResult;
}
public int CompareTo_(int lFlags, IWbemClassObjectFreeThreaded pCompareTo)
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.CompareTo_f(16, pWbemClassObject, lFlags, pCompareTo.pWbemClassObject);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int GetPropertyOrigin_(string wszName, out string pstrClassName)
{
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.GetPropertyOrigin_f(17, pWbemClassObject, wszName, out pstrClassName);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int InheritsFrom_(string strAncestor)
{
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.InheritsFrom_f(18, pWbemClassObject, strAncestor);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int GetMethod_(string wszName, int lFlags, out IWbemClassObjectFreeThreaded ppInSignature, out IWbemClassObjectFreeThreaded ppOutSignature)
{
ppOutSignature = new IWbemClassObjectFreeThreaded(pOutSignature);
}
- GC.KeepAlive ( this ) ;
+ GC.KeepAlive(this);
return hResult;
}
public int PutMethod_(string wszName, int lFlags, IWbemClassObjectFreeThreaded pInSignature, IWbemClassObjectFreeThreaded pOutSignature)
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.PutMethod_f(20, pWbemClassObject, wszName, lFlags, pInSignature, pOutSignature);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int DeleteMethod_(string wszName)
{
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.DeleteMethod_f(21, pWbemClassObject, wszName);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int BeginMethodEnumeration_(int lEnumFlags)
{
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.BeginMethodEnumeration_f(22, pWbemClassObject, lEnumFlags);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int NextMethod_(int lFlags, out string pstrName, out IWbemClassObjectFreeThreaded ppInSignature, out IWbemClassObjectFreeThreaded ppOutSignature)
{
if (pOutSignature != IntPtr.Zero)
ppOutSignature = new IWbemClassObjectFreeThreaded(pOutSignature);
}
- GC.KeepAlive ( this ) ;
+ GC.KeepAlive(this);
return hResult;
}
public int EndMethodEnumeration_()
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.EndMethodEnumeration_f(24, pWbemClassObject);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int GetMethodQualifierSet_(string wszMethod, out IWbemQualifierSetFreeThreaded ppQualSet)
{
ppQualSet = null;
else
ppQualSet = new IWbemQualifierSetFreeThreaded(pQualSet);
- GC.KeepAlive ( this ) ;
+ GC.KeepAlive(this);
return hResult;
}
public int GetMethodOrigin_(string wszMethodName, out string pstrClassName)
if (pWbemClassObject == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.GetMethodOrigin_f(26, pWbemClassObject, wszMethodName, out pstrClassName);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
private enum STATFLAG
public void Dispose()
{
- Dispose_(false) ;
+ Dispose_(false);
}
private void Dispose_( bool finalization )
if (pWbemQualifierSet == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.QualifierGet_f(3, pWbemQualifierSet, wszName, lFlags, ref pVal, ref plFlavor);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int Put_(string wszName, ref object pVal, int lFlavor)
if (pWbemQualifierSet == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.QualifierPut_f(4, pWbemQualifierSet, wszName, ref pVal, lFlavor);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int Delete_(string wszName)
{
if (pWbemQualifierSet == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.QualifierDelete_f(5, pWbemQualifierSet, wszName);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int GetNames_(int lFlags, out string[] pNames)
{
if (pWbemQualifierSet == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.QualifierGetNames_f(6, pWbemQualifierSet, lFlags, out pNames);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int BeginEnumeration_(int lFlags)
{
if (pWbemQualifierSet == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.QualifierBeginEnumeration_f(7, pWbemQualifierSet, lFlags);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int Next_(int lFlags, out string pstrName, out object pVal, out int plFlavor)
{
if (pWbemQualifierSet == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.QualifierNext_f(8, pWbemQualifierSet, lFlags, out pstrName, out pVal, out plFlavor);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
public int EndEnumeration_()
{
if (pWbemQualifierSet == IntPtr.Zero)
throw new ObjectDisposedException(name);
int res = WmiNetUtilsHelper.QualifierEndEnumeration_f(9, pWbemQualifierSet);
- GC.KeepAlive ( this ) ;
- return res ;
+ GC.KeepAlive(this);
+ return res;
}
}
internal class ThreadDispatch
{
#region Private fields
- private Thread thread ;
- private Exception exception ; // Exception thrown from worker method (if any). Exposed as property.
- private ThreadWorkerMethodWithReturn threadWorkerMethodWithReturn ; // Delegate to be called for worker method with return value
- private ThreadWorkerMethodWithReturnAndParam threadWorkerMethodWithReturnAndParam ; // Delegate to be called for worker method with return value and parameter
- private ThreadWorkerMethod threadWorkerMethod ; // Delegate to be called for worker method
- private ThreadWorkerMethodWithParam threadWorkerMethodWithParam ; // Delegate to be called for worker method with parameter
- private object threadReturn ; // Return data from worker method.
- private object threadParams ; // Parameters to be passed to worker method
- private bool backgroundThread ; // Is this a background thread?
- private ApartmentState apartmentType ; // Apartment type of thread
+ private Thread thread;
+ private Exception exception; // Exception thrown from worker method (if any). Exposed as property.
+ private ThreadWorkerMethodWithReturn threadWorkerMethodWithReturn; // Delegate to be called for worker method with return value
+ private ThreadWorkerMethodWithReturnAndParam threadWorkerMethodWithReturnAndParam; // Delegate to be called for worker method with return value and parameter
+ private ThreadWorkerMethod threadWorkerMethod; // Delegate to be called for worker method
+ private ThreadWorkerMethodWithParam threadWorkerMethodWithParam; // Delegate to be called for worker method with parameter
+ private object threadReturn; // Return data from worker method.
+ private object threadParams; // Parameters to be passed to worker method
+ private bool backgroundThread; // Is this a background thread?
+ private ApartmentState apartmentType; // Apartment type of thread
#endregion
#region Properties
{
get
{
- return this.exception ;
+ return this.exception;
}
}
{
get
{
- return this.threadParams ;
+ return this.threadParams;
}
set
{
- this.threadParams = value ;
+ this.threadParams = value;
}
}
{
get
{
- return this.backgroundThread ;
+ return this.backgroundThread;
}
set
{
- this.backgroundThread = value ;
+ this.backgroundThread = value;
}
}
{
get
{
- return this.threadReturn ;
+ return this.threadReturn;
}
}
{
get
{
- return this.apartmentType ;
+ return this.apartmentType;
}
set
{
- this.apartmentType = value ;
+ this.apartmentType = value;
}
}
#endregion
/// <summary>
/// Delegate declaration representing signature of worker method with return value.
/// </summary>
- public delegate object ThreadWorkerMethodWithReturn ( ) ;
+ public delegate object ThreadWorkerMethodWithReturn ( );
/// <summary>
/// Delegate declaration representing signature of worker method with return value and parameter.
/// </summary>
- public delegate object ThreadWorkerMethodWithReturnAndParam ( object param ) ;
+ public delegate object ThreadWorkerMethodWithReturnAndParam ( object param );
/// <summary>
/// Delegate declaration representing signature of worker method with no return value and no parameter
/// </summary>
- public delegate void ThreadWorkerMethod ( ) ;
+ public delegate void ThreadWorkerMethod ( );
/// <summary>
/// Delegate declaration representing signature of worker method with parameter.
/// </summary>
- public delegate void ThreadWorkerMethodWithParam ( object param ) ;
+ public delegate void ThreadWorkerMethodWithParam ( object param );
#endregion
#region Public methods
/// <param name="workerMethod">Delegate to be called to perform the work</param>
public ThreadDispatch ( ThreadWorkerMethodWithReturn workerMethod ) : this ( )
{
- InitializeThreadState ( null, workerMethod, ApartmentState.MTA, false ) ;
+ InitializeThreadState ( null, workerMethod, ApartmentState.MTA, false );
}
/// <summary>
/// <param name="workerMethod">Delegate to be called to perform the work</param>
public ThreadDispatch ( ThreadWorkerMethodWithReturnAndParam workerMethod ) : this ( )
{
- InitializeThreadState ( null, workerMethod, ApartmentState.MTA, false ) ;
+ InitializeThreadState ( null, workerMethod, ApartmentState.MTA, false );
}
/// <summary>
/// <param name="workerMethod">Delegate to be called to perform the work</param>
public ThreadDispatch ( ThreadWorkerMethodWithParam workerMethod ) : this ( )
{
- InitializeThreadState ( null, workerMethod, ApartmentState.MTA, false ) ;
+ InitializeThreadState ( null, workerMethod, ApartmentState.MTA, false );
}
/// <summary>
/// <param name="workerMethod">Delegate to be called to perform the work</param>
public ThreadDispatch ( ThreadWorkerMethod workerMethod ) : this ( )
{
- InitializeThreadState ( null, workerMethod, ApartmentState.MTA, false ) ;
+ InitializeThreadState ( null, workerMethod, ApartmentState.MTA, false );
}
/// <summary>
/// </summary>
public void Start ( )
{
- this.exception = null ;
- DispatchThread ( ) ;
+ this.exception = null;
+ DispatchThread();
if ( this.Exception != null )
{
- throw this.Exception ;
+ throw this.Exception;
}
}
#endregion
/// </summary>
private ThreadDispatch ( )
{
- this.thread = null ;
- this.exception = null ;
- this.threadParams = null ;
- this.threadWorkerMethodWithReturn = null ;
- this.threadWorkerMethodWithReturnAndParam = null ;
- this.threadWorkerMethod = null ;
- this.threadWorkerMethodWithParam = null;
- this.threadReturn = null ;
- this.backgroundThread = false ;
- this.apartmentType = ApartmentState.MTA ;
+ this.thread = null;
+ this.exception = null;
+ this.threadParams = null;
+ this.threadWorkerMethodWithReturn = null;
+ this.threadWorkerMethodWithReturnAndParam = null;
+ this.threadWorkerMethod = null;
+ this.threadWorkerMethodWithParam = null;
+ this.threadReturn = null;
+ this.backgroundThread = false;
+ this.apartmentType = ApartmentState.MTA;
}
/// <summary>
/// <param name="background">Thread is created as a background or not</param>
private void InitializeThreadState ( object threadParams, ThreadWorkerMethodWithReturn workerMethod, ApartmentState aptState, bool background )
{
- this.threadParams = threadParams ;
- this.threadWorkerMethodWithReturn = workerMethod ;
- this.thread = new Thread ( new ThreadStart ( ThreadEntryPointMethodWithReturn ) ) ;
- this.thread.SetApartmentState(aptState) ;
- this.backgroundThread = background ;
+ this.threadParams = threadParams;
+ this.threadWorkerMethodWithReturn = workerMethod;
+ this.thread = new Thread ( new ThreadStart ( ThreadEntryPointMethodWithReturn ) );
+ this.thread.SetApartmentState(aptState);
+ this.backgroundThread = background;
}
/// <summary>
/// <param name="background">Thread is created as a background or not</param>
private void InitializeThreadState ( object threadParams, ThreadWorkerMethodWithReturnAndParam workerMethod, ApartmentState aptState, bool background )
{
- this.threadParams = threadParams ;
- this.threadWorkerMethodWithReturnAndParam = workerMethod ;
- this.thread = new Thread ( new ThreadStart ( ThreadEntryPointMethodWithReturnAndParam ) ) ;
+ this.threadParams = threadParams;
+ this.threadWorkerMethodWithReturnAndParam = workerMethod;
+ this.thread = new Thread ( new ThreadStart ( ThreadEntryPointMethodWithReturnAndParam ) );
this.thread.SetApartmentState(aptState);
- this.backgroundThread = background ;
+ this.backgroundThread = background;
}
/// <summary>
/// <param name="background">Thread is created as a background or not</param>
private void InitializeThreadState ( object threadParams, ThreadWorkerMethod workerMethod, ApartmentState aptState, bool background )
{
- this.threadParams = threadParams ;
- this.threadWorkerMethod = workerMethod ;
- this.thread = new Thread ( new ThreadStart ( ThreadEntryPoint ) ) ;
+ this.threadParams = threadParams;
+ this.threadWorkerMethod = workerMethod;
+ this.thread = new Thread ( new ThreadStart ( ThreadEntryPoint ) );
this.thread.SetApartmentState(aptState );
- this.backgroundThread = background ;
+ this.backgroundThread = background;
}
/// <summary>
/// <param name="background">Thread is created as a background or not</param>
private void InitializeThreadState ( object threadParams, ThreadWorkerMethodWithParam workerMethod, ApartmentState aptState, bool background )
{
- this.threadParams = threadParams ;
- this.threadWorkerMethodWithParam = workerMethod ;
- this.thread = new Thread ( new ThreadStart ( ThreadEntryPointMethodWithParam ) ) ;
+ this.threadParams = threadParams;
+ this.threadWorkerMethodWithParam = workerMethod;
+ this.thread = new Thread ( new ThreadStart ( ThreadEntryPointMethodWithParam ) );
this.thread.SetApartmentState( aptState );
- this.backgroundThread = background ;
+ this.backgroundThread = background;
}
/// </summary>
private void DispatchThread ( )
{
- this.thread.Start ( ) ;
- this.thread.Join ( ) ;
+ this.thread.Start();
+ this.thread.Join();
}
/// <summary>
{
try
{
- this.threadWorkerMethod ( ) ;
+ this.threadWorkerMethod();
}
- catch ( Exception e )
+ catch (Exception e)
{
- this.exception = e ;
+ this.exception = e;
}
}
{
try
{
- this.threadWorkerMethodWithParam ( this.threadParams ) ;
+ this.threadWorkerMethodWithParam ( this.threadParams );
}
- catch ( Exception e )
+ catch (Exception e)
{
- this.exception = e ;
+ this.exception = e;
}
}
{
try
{
- this.threadReturn = this.threadWorkerMethodWithReturn ( ) ;
+ this.threadReturn = this.threadWorkerMethodWithReturn();
}
- catch ( Exception e )
+ catch (Exception e)
{
- this.exception = e ;
+ this.exception = e;
}
}
{
try
{
- this.threadReturn = this.threadWorkerMethodWithReturnAndParam ( this.threadParams) ;
+ this.threadReturn = this.threadWorkerMethodWithReturnAndParam(this.threadParams);
}
- catch ( Exception e )
+ catch (Exception e)
{
- this.exception = e ;
+ this.exception = e;
}
}
#endregion
}
}
- internal IWbemClassObjectFreeThreaded _wbemObject ;
+ internal IWbemClassObjectFreeThreaded _wbemObject;
private PropertyDataCollection properties;
private PropertyDataCollection systemProperties;
{
get
{
- Initialize ( true ) ;
+ Initialize ( true );
if (properties == null)
properties = new PropertyDataCollection(this, false);
{
get
{
- Initialize ( false ) ;
+ Initialize ( false );
if (systemProperties == null)
systemProperties = new PropertyDataCollection(this, true);
{
get
{
- Initialize ( true ) ;
+ Initialize ( true );
if (qualifiers == null)
qualifiers = new QualifierDataCollection(this);
get { return GetPropertyValue(propertyName); }
set
{
- Initialize ( true ) ;
+ Initialize ( true );
try
{
SetPropertyValue (propertyName, value);
{
get
{
- Initialize ( true ) ;
+ Initialize ( true );
if (methods == null)
methods = new MethodDataCollection(this);
if ((null == Path) || (null == Path.Path) || (0 == Path.Path.Length))
throw new InvalidOperationException();
- Initialize ( false ) ;
+ Initialize ( false );
EnumerationOptions o = (null == options) ? new EnumerationOptions() : (EnumerationOptions)options.Clone();
if (null == Path)
throw new InvalidOperationException();
- Initialize ( false ) ;
+ Initialize ( false );
IEnumWbemClassObject enumWbem = null;
EnumerationOptions o = (null == options) ? new EnumerationOptions() : (EnumerationOptions)options.Clone();
if (null == Path)
throw new InvalidOperationException();
- Initialize ( false ) ;
+ Initialize ( false );
EnumerationOptions o = (null == options) ? new EnumerationOptions() :
(EnumerationOptions)options.Clone();
if ((null == Path) || (null == Path.Path) || (0 == Path.Path.Length))
throw new InvalidOperationException();
- Initialize ( false ) ;
+ Initialize ( false );
IEnumWbemClassObject enumWbem = null;
if ((null == Path) || (null == Path.Path) || (0 == Path.Path.Length))
throw new InvalidOperationException();
- Initialize ( true ) ;
+ Initialize ( true );
if (null == watcher)
throw new ArgumentNullException(nameof(watcher));
if ((null == Path) || (null == Path.Path) || (0 == Path.Path.Length))
throw new InvalidOperationException();
- Initialize ( false ) ;
+ Initialize ( false );
IEnumWbemClassObject enumWbem = null;
throw new ArgumentNullException(nameof(watcher));
else
{
- Initialize ( true ) ;
+ Initialize ( true );
EnumerationOptions o =
(null != options) ? (EnumerationOptions)options.Clone() : new EnumerationOptions();
private int status;
private readonly bool isLocal;
- public int Status {get {return status;} set {status=value;}}
+ public int Status {get {return status; } set {status=value; }}
public SinkForEventQuery (ManagementEventWatcher eventWatcher,
object context,
//
// Ensure we are able to trap exceptions from worker thread.
//
- ThreadDispatch disp = new ThreadDispatch ( new ThreadDispatch.ThreadWorkerMethodWithParam ( HackToCreateStubInMTA ) ) ;
- disp.Parameter = this ;
- disp.Start ( ) ;
+ ThreadDispatch disp = new ThreadDispatch ( new ThreadDispatch.ThreadWorkerMethodWithParam ( HackToCreateStubInMTA ) );
+ disp.Parameter = this;
+ disp.Start ( );
}
}
private void HackToCreateStubInMTA(object param)
{
- SinkForEventQuery obj = (SinkForEventQuery) param ;
+ SinkForEventQuery obj = (SinkForEventQuery) param;
object dmuxStub = null;
obj.Status = WmiNetUtilsHelper.GetDemultiplexedStub_f (obj, obj.isLocal, out dmuxStub);
obj.stub = (IWbemObjectSink) dmuxStub;
{
IWbemClassObjectFreeThreaded tempObj = null;
- Initialize ( false ) ; // this may throw
+ Initialize ( false ); // this may throw
if ((null == path) || (path.Path.Length==0))
throw new InvalidOperationException();
/// </example>
public void Get(ManagementOperationObserver watcher)
{
- Initialize ( false ) ;
+ Initialize ( false );
if ((null == path) || (path.Path.Length==0))
throw new InvalidOperationException();
if ((null == path) || (path.Path.Length==0))
throw new InvalidOperationException();
- Initialize ( false ) ;
+ Initialize ( false );
IEnumWbemClassObject enumWbem = null;
EnumerationOptions o = (null != options) ? options : new EnumerationOptions();
if ((null == path) || (path.Path.Length==0))
throw new InvalidOperationException();
- Initialize ( true ) ;
+ Initialize ( true );
if (null == watcher)
throw new ArgumentNullException(nameof(watcher));
if ((null == path) || (path.Path.Length==0))
throw new InvalidOperationException();
- Initialize ( false ) ;
+ Initialize ( false );
IEnumWbemClassObject enumWbem = null;
EnumerationOptions o =
throw new ArgumentNullException(nameof(watcher));
else
{
- Initialize ( false ) ;
+ Initialize ( false );
// Ensure we switch off ReturnImmediately as this is invalid for async calls
EnumerationOptions o =
public ManagementPath Put(PutOptions options)
{
ManagementPath newPath = null;
- Initialize ( true ) ;
+ Initialize ( true );
PutOptions o = (null != options) ? options : new PutOptions();
IWbemServices wbemServices = scope.GetIWbemServices();
throw new ArgumentNullException(nameof(watcher));
else
{
- Initialize ( false ) ;
+ Initialize ( false );
PutOptions o = (null == options) ?
new PutOptions() : (PutOptions)options.Clone();
/// </returns>
public ManagementPath CopyTo(ManagementPath path, PutOptions options)
{
- Initialize ( false ) ;
+ Initialize ( false );
ManagementScope destinationScope = null;
throw new ArgumentNullException(nameof(watcher));
else
{
- Initialize ( false ) ;
+ Initialize ( false );
ManagementScope destinationScope = null;
destinationScope = new ManagementScope(path, scope);
if ((null == path) || (path.Path.Length==0))
throw new InvalidOperationException();
- Initialize ( false ) ;
+ Initialize ( false );
DeleteOptions o = (null != options) ? options : new DeleteOptions();
IWbemServices wbemServices = scope.GetIWbemServices();
throw new ArgumentNullException(nameof(watcher));
else
{
- Initialize ( false ) ;
+ Initialize ( false );
DeleteOptions o = (null != options) ? (DeleteOptions) options.Clone() : new DeleteOptions();
// If someone has registered for progress, make sure we flag it
throw new ArgumentNullException(nameof(methodName));
else
{
- Initialize ( false ) ;
+ Initialize ( false );
// Map args into a inparams structure
ManagementBaseObject inParameters;
throw new ArgumentNullException(nameof(methodName));
else
{
- Initialize ( false ) ;
+ Initialize ( false );
// Map args into a inparams structure
ManagementBaseObject inParameters;
throw new ArgumentNullException(nameof(methodName));
else
{
- Initialize ( false ) ;
+ Initialize ( false );
InvokeMethodOptions o = (null != options) ? options : new InvokeMethodOptions();
IWbemServices wbemServices = scope.GetIWbemServices();
throw new ArgumentNullException(nameof(methodName));
else
{
- Initialize ( false ) ;
+ Initialize ( false );
InvokeMethodOptions o = (null != options) ?
(InvokeMethodOptions) options.Clone() : new InvokeMethodOptions();
throw new ArgumentNullException(nameof(methodName));
else
{
- Initialize ( false ) ;
+ Initialize ( false );
// Do we have the class?
if (null == wmiClass)
{
if (!isDisposed)
{
- Dispose ( true ) ;
+ Dispose ( true );
}
}
//
int count = 0;
- IEnumerator enumCol = this.GetEnumerator ( ) ;
+ IEnumerator enumCol = this.GetEnumerator ( );
while ( enumCol.MoveNext() == true )
{
- count++ ;
+ count++;
}
- return count ;
+ return count;
}
}
{ return (((Flags & (int)tag_WBEM_GENERIC_FLAG_TYPE.WBEM_FLAG_ENSURE_LOCATABLE) != 0) ? true : false); }
set
{ Flags = (value == true) ? (Flags | (int)tag_WBEM_GENERIC_FLAG_TYPE.WBEM_FLAG_ENSURE_LOCATABLE) :
- (Flags & (int)~tag_WBEM_GENERIC_FLAG_TYPE.WBEM_FLAG_ENSURE_LOCATABLE) ; }
+ (Flags & (int)~tag_WBEM_GENERIC_FLAG_TYPE.WBEM_FLAG_ENSURE_LOCATABLE); }
}
{ return (((Flags & (int)tag_WBEM_QUERY_FLAG_TYPE.WBEM_FLAG_PROTOTYPE) != 0) ? true : false); }
set
{ Flags = (value == true) ? (Flags | (int)tag_WBEM_QUERY_FLAG_TYPE.WBEM_FLAG_PROTOTYPE) :
- (Flags & (int)~tag_WBEM_QUERY_FLAG_TYPE.WBEM_FLAG_PROTOTYPE) ; }
+ (Flags & (int)~tag_WBEM_QUERY_FLAG_TYPE.WBEM_FLAG_PROTOTYPE); }
}
/// <summary>
{ return (((Flags & (int)tag_WBEM_GENERIC_FLAG_TYPE.WBEM_FLAG_DIRECT_READ) != 0) ? true : false); }
set
{ Flags = (value == true) ? (Flags | (int)tag_WBEM_GENERIC_FLAG_TYPE.WBEM_FLAG_DIRECT_READ) :
- (Flags & (int)~tag_WBEM_GENERIC_FLAG_TYPE.WBEM_FLAG_DIRECT_READ) ; }
+ (Flags & (int)~tag_WBEM_GENERIC_FLAG_TYPE.WBEM_FLAG_DIRECT_READ); }
}
if (securePassword == null)
{
securePassword = new SecureString();
- for ( int i=0; i <value.Length;i++)
+ for ( int i=0; i <value.Length; i++)
{
securePassword.AppendChar(value[i]);
}
else
{
SecureString tempStr = new SecureString();
- for ( int i=0; i <value.Length;i++)
+ for ( int i=0; i <value.Length; i++)
{
tempStr.AppendChar(value[i]);
}
if (password != null)
{
this.securePassword = new SecureString();
- for ( int i=0; i <password.Length;i++)
+ for ( int i=0; i <password.Length; i++)
{
securePassword.AppendChar(password[i]);
}
private IWbemPath CreateWbemPath(string path)
{
- IWbemPath wbemPath = (IWbemPath)MTAHelper.CreateInMTA(typeof(WbemDefPath));//new WbemDefPath();
+ IWbemPath wbemPath = (IWbemPath)MTAHelper.CreateInMTA(typeof(WbemDefPath)); //new WbemDefPath();
SetWbemPath(wbemPath, path);
return wbemPath;
}
{
get
{
- return (Path.Length == 0 ) ;
+ return (Path.Length == 0 );
}
}
if (0 != string.Compare(oldValue, value, StringComparison.OrdinalIgnoreCase))
{
if (null == wmiPath)
- wmiPath = (IWbemPath)MTAHelper.CreateInMTA(typeof(WbemDefPath));//new WbemDefPath ();
+ wmiPath = (IWbemPath)MTAHelper.CreateInMTA(typeof(WbemDefPath)); //new WbemDefPath ();
else if (isWbemPathShared)
{
// Check if this IWbemPath is shared among multiple managed objects.
}
}
}
- else {;} // Continue on. Could have different server name, same ns specified.
+ else {; } // Continue on. Could have different server name, same ns specified.
//
// Update Server property if specified in the namespace.
int status = (int)ManagementStatus.NoError;
if (wmiPath == null)
- wmiPath = (IWbemPath)MTAHelper.CreateInMTA(typeof(WbemDefPath));//new WbemDefPath();
+ wmiPath = (IWbemPath)MTAHelper.CreateInMTA(typeof(WbemDefPath)); //new WbemDefPath();
else if (isWbemPathShared)
{
// Check if this IWbemPath is shared among multiple managed objects.
/// </value>
public virtual string QueryString
{
- get {return (null != queryString) ? queryString : string.Empty;}
+ get {return (null != queryString) ? queryString : string.Empty; }
set {
if (queryString != value) {
ParseQuery (value); // this may throw
/// </value>
public virtual string QueryLanguage
{
- get {return (null != queryLanguage) ? queryLanguage : string.Empty;}
+ get {return (null != queryLanguage) ? queryLanguage : string.Empty; }
set {
if (queryLanguage != value) {
queryLanguage = value;
public override string QueryLanguage
{
get
- {return base.QueryLanguage;}
+ {return base.QueryLanguage; }
}
//ICloneable
// We need to force a rebuild as we may not have detected
// a change to selected properties
BuildQuery ();
- return base.QueryString;}
+ return base.QueryString; }
set {
base.QueryString = value;
}
public override string QueryLanguage
{
get
- {return base.QueryLanguage;}
+ {return base.QueryLanguage; }
}
/// <summary>
//
// Ensure we are able to trap exceptions from worker thread.
//
- ThreadDispatch disp = new ThreadDispatch ( new ThreadDispatch.ThreadWorkerMethodWithParam ( InitializeGuts ) ) ;
- disp.Parameter = this ;
- disp.Start ( ) ;
+ ThreadDispatch disp = new ThreadDispatch ( new ThreadDispatch.ThreadWorkerMethodWithParam ( InitializeGuts ) );
+ disp.Parameter = this;
+ disp.Start ( );
}
else
InitializeGuts(this);
private void InitializeGuts(object o)
{
- ManagementScope threadParam = (ManagementScope) o ;
+ ManagementScope threadParam = (ManagementScope) o;
IWbemLocator loc = (IWbemLocator) new WbemLocator();
IntPtr punk = IntPtr.Zero;
{
get {
RefreshPropertyInfo();
- return ((propertyFlavor & (int)tag_WBEM_FLAVOR_TYPE.WBEM_FLAVOR_ORIGIN_PROPAGATED) != 0) ? false : true ; }
+ return ((propertyFlavor & (int)tag_WBEM_FLAVOR_TYPE.WBEM_FLAVOR_ORIGIN_PROPAGATED) != 0) ? false : true; }
}
/// <summary>
{
get {
RefreshPropertyInfo();
- return ((propertyType & (int)tag_CIMTYPE_ENUMERATION.CIM_FLAG_ARRAY) != 0);}
+ return ((propertyType & (int)tag_CIMTYPE_ENUMERATION.CIM_FLAG_ARRAY) != 0); }
}
/// <summary>
bool bStart = false;
int Len = OriginalNamespace.Length;
OriginalNamespace = string.Empty;
- for (int i = 2 ; i < Len ; i++)
+ for (int i = 2; i < Len; i++)
{
if (bStart == true)
{
{
cmp = new CodeMemberProperty ();
cmp.Name = propName;
- cmp.Attributes = MemberAttributes.Public | MemberAttributes.Final ;
+ cmp.Attributes = MemberAttributes.Public | MemberAttributes.Final;
cmp.Type = new CodeTypeReference(propType);
caa = new CodeAttributeArgument();
SysPropsClass.Members.Add(cctor);
caa = new CodeAttributeArgument();
- caa.Value = new CodeTypeOfExpression (typeof(System.ComponentModel.ExpandableObjectConverter)) ;
+ caa.Value = new CodeTypeOfExpression (typeof(System.ComponentModel.ExpandableObjectConverter));
cad = new CodeAttributeDeclaration();
cad.Name = PublicNamesUsed["TypeConverter"].ToString();
cad.Arguments.Add(caa);
//Now we will have to find the occurrence of the first character and trim all the characters before that
strPropTemp = prop.Name.ToCharArray();
- for (i=0;i < strPropTemp.Length;i++)
+ for (i=0; i < strPropTemp.Length; i++)
{
if (char.IsLetterOrDigit(strPropTemp[i]) == true)
{
i = 0;
}
strPropName = new char[strPropTemp.Length - i];
- for (int j=i;j < strPropTemp.Length;j++)
+ for (int j=i; j < strPropTemp.Length; j++)
{
strPropName[j - i] = strPropTemp[j];
}
//private WmiObject _privObject
cf = new CodeMemberField();
cf.Name = PrivateNamesUsed["LateBoundObject"].ToString();
- cf.Attributes = MemberAttributes.Private | MemberAttributes.Final ;
+ cf.Attributes = MemberAttributes.Private | MemberAttributes.Final;
cf.Type = new CodeTypeReference(PublicNamesUsed["BaseObjClass"].ToString());
SysPropsClass.Members.Add(cf);
string IsValidPropName = string.Empty;
bool bDateIsTimeInterval = false;
- for (int i=0;i< PublicProperties.Count;i++)
+ for (int i=0; i< PublicProperties.Count; i++)
{
bDateIsTimeInterval = false;
PropertyData prop = classobj.Properties[PublicProperties.GetKey(i).ToString()];
// Adding TypeConverter Attribute
caa = new CodeAttributeArgument();
- caa.Value = new CodeTypeOfExpression (PrivateNamesUsed["ConverterClass"].ToString()) ;
+ caa.Value = new CodeTypeOfExpression (PrivateNamesUsed["ConverterClass"].ToString());
cad = new CodeAttributeDeclaration();
cad.Name = PublicNamesUsed["TypeConverter"].ToString();
cad.Arguments.Add(caa);
if (q.Value != null)
{
string [] strArray = (string [])q.Value;
- for (int i=0;i < strArray.Length ;i++)
+ for (int i=0; i < strArray.Length; i++)
{
try
{
{
ArrayList arTemp = new ArrayList(5);
string [] strArray = (string[])q.Value;
- for (int i=0;i < strArray.Length;i++)
+ for (int i=0; i < strArray.Length; i++)
{
if (strArray[i].Length == 0)
{
if (q.Value != null)
{
string [] strArray = (string [])q.Value;
- for (int i=0;i < strArray.Length;i++)
+ for (int i=0; i < strArray.Length; i++)
{
BitMap.Add(ConvertBitMapValueToInt32(strArray[i]));
}
{
ArrayList arTemp = new ArrayList(5);
string [] strArray = (string [])q.Value;
- for (int i=0;i < strArray.Length;i++)
+ for (int i=0; i < strArray.Length; i++)
{
if (strArray[i].Length == 0)
{
cmm.Attributes = MemberAttributes.Private | MemberAttributes.Static | MemberAttributes.Final;
cmm.ReturnType = new CodeTypeReference("System.String");
- for (int i=0; i < arrKeys.Count;i++)
+ for (int i=0; i < arrKeys.Count; i++)
{
strType = ((CodeTypeReference)arrKeyType[i]).BaseType;
cmm.Parameters.Add(new CodeParameterDeclarationExpression(strType,
cmm.Statements.Add(new CodeVariableDeclarationStatement("System.String", strPathObject, new CodePrimitiveExpression(strPath)));
CodeMethodInvokeExpression cmietoAdd;
- for (int i=0; i < arrKeys.Count;i++)
+ for (int i=0; i < arrKeys.Count; i++)
{
if (((CodeTypeReference)arrKeyType[i]).BaseType == "System.String")
{
cmieInit.Method.MethodName = PrivateNamesUsed["InitialObjectFunc"].ToString();
cmieInit.Method.TargetObject = new CodeThisReferenceExpression();
- for (int i=0; i < arrKeys.Count;i++)
+ for (int i=0; i < arrKeys.Count; i++)
{
cpde = new CodeParameterDeclarationExpression();
cpde.Type = new CodeTypeReference(((CodeTypeReference)arrKeyType[i]).BaseType);
cmie.Method.TargetObject = new CodeTypeReferenceExpression(PrivateNamesUsed["GeneratedClassName"].ToString());
cmie.Method.MethodName = PublicNamesUsed["ConstructPathFunction"].ToString();
- for (int i=0; i < arrKeys.Count;i++)
+ for (int i=0; i < arrKeys.Count; i++)
{
cmie.Parameters.Add(new CodeVariableReferenceExpression("key"+arrKeys[i]));
}
if (arrKeyType.Count > 0)
{
- for (int i=0; i < arrKeys.Count;i++)
+ for (int i=0; i < arrKeys.Count; i++)
{
cpde = new CodeParameterDeclarationExpression();
cpde.Type = new CodeTypeReference(((CodeTypeReference)arrKeyType[i]).BaseType);
cmie.Method.TargetObject = new CodeTypeReferenceExpression(PrivateNamesUsed["GeneratedClassName"].ToString());
cmie.Method.MethodName = PublicNamesUsed["ConstructPathFunction"].ToString();
- for (int i=0; i < arrKeys.Count;i++)
+ for (int i=0; i < arrKeys.Count; i++)
{
cmie.Parameters.Add(new CodeVariableReferenceExpression("key"+arrKeys[i]));
}
ArrayList outParamsName = new ArrayList(5);
ArrayList inoutParams = new ArrayList(5);
ArrayList inoutParamsType = new ArrayList(5);
- for (int k=0;k< PublicMethods.Count;k++)
+ for (int k=0; k< PublicMethods.Count; k++)
{
bStatic = false;
}
//Find out whether it is a in/out Parameter
- for (int i=0; i < outParamsName.Count;i++)
+ for (int i=0; i < outParamsName.Count; i++)
{
if (string.Equals(prop.Name, outParamsName[i].ToString(), StringComparison.OrdinalIgnoreCase))
{
}
bInOut = false;
- for (int i=0; i < inoutParams.Count;i++)
+ for (int i=0; i < inoutParams.Count; i++)
{
if (string.Equals(prop.Name, inoutParams[i].ToString(), StringComparison.OrdinalIgnoreCase))
{
//Now for each in/out params generate the statement
// <inoutParam> = outParams.Properties["<inoutParam>"];
- for (int i=0;i < inoutParams.Count;i++)
+ for (int i=0; i < inoutParams.Count; i++)
{
cpre = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strOutParams), "Properties");
cie = new CodeIndexerExpression(cpre, new CodePrimitiveExpression(inoutParams[i].ToString()));
{
cmm = new CodeMemberMethod();
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static ;
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static;
cmm.Name = PublicNamesUsed["FilterFunction"].ToString();
cmm.ReturnType = new CodeTypeReference(PrivateNamesUsed["CollectionClass"].ToString());
string strCondition = "condition";
cmm = new CodeMemberMethod();
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static ;
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static;
cmm.Name = PublicNamesUsed["FilterFunction"].ToString();
cmm.ReturnType = new CodeTypeReference(PrivateNamesUsed["CollectionClass"].ToString());
cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.String", strCondition));
string strSelectedProperties = "selectedProperties";
cmm = new CodeMemberMethod();
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static ;
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static;
cmm.Name = PublicNamesUsed["FilterFunction"].ToString();
cmm.ReturnType = new CodeTypeReference(PrivateNamesUsed["CollectionClass"].ToString());
cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.String []", strSelectedProperties));
string strCondition = "condition";
cmm = new CodeMemberMethod();
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static ;
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static;
cmm.Name = PublicNamesUsed["FilterFunction"].ToString();
cmm.ReturnType = new CodeTypeReference(PrivateNamesUsed["CollectionClass"].ToString());
cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.String", strCondition));
{
cmm = new CodeMemberMethod();
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static ;
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static;
cmm.Name = PublicNamesUsed["FilterFunction"].ToString();
cmm.ReturnType = new CodeTypeReference(PrivateNamesUsed["CollectionClass"].ToString());
cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()), PrivateNamesUsed["ScopeParam"].ToString()));
string strCondition = "condition";
cmm = new CodeMemberMethod();
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static ;
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static;
cmm.Name = PublicNamesUsed["FilterFunction"].ToString();
cmm.ReturnType = new CodeTypeReference(PrivateNamesUsed["CollectionClass"].ToString());
cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()), PrivateNamesUsed["ScopeParam"].ToString()));
string strSelectedProperties = "selectedProperties";
cmm = new CodeMemberMethod();
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static ;
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static;
cmm.Name = PublicNamesUsed["FilterFunction"].ToString();
cmm.ReturnType = new CodeTypeReference(PrivateNamesUsed["CollectionClass"].ToString());
cmm.Parameters.Add(new CodeParameterDeclarationExpression(PublicNamesUsed["ScopeClass"].ToString(), PrivateNamesUsed["ScopeParam"].ToString()));
string strObjectSearcher = "ObjectSearcher";
cmm = new CodeMemberMethod();
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static ;
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static;
cmm.Name = PublicNamesUsed["FilterFunction"].ToString();
cmm.ReturnType = new CodeTypeReference(PrivateNamesUsed["CollectionClass"].ToString());
{
cf = new CodeMemberField();
cf.Name = memberName;
- cf.Attributes = MemberAttributes.Private | MemberAttributes.Final ;
+ cf.Attributes = MemberAttributes.Private | MemberAttributes.Final;
if (isStatic == true)
{
cf.Attributes = cf.Attributes | MemberAttributes.Static;
*/
cf = new CodeMemberField();
cf.Name = baseTypeMemberVariable;
- cf.Attributes = MemberAttributes.Private | MemberAttributes.Final ;
+ cf.Attributes = MemberAttributes.Private | MemberAttributes.Final;
cf.Type = new CodeTypeReference(PublicNamesUsed["TypeConverter"].ToString());
CodeConvertorClass.Members.Add(cf);
cf = new CodeMemberField();
cf.Name = typeMemberVariable;
- cf.Attributes = MemberAttributes.Private | MemberAttributes.Final ;
+ cf.Attributes = MemberAttributes.Private | MemberAttributes.Final;
cf.Type = new CodeTypeReference(PublicNamesUsed["Type"].ToString());
CodeConvertorClass.Members.Add(cf);
}
*/
cctor = new CodeConstructor();
- cctor.Attributes = MemberAttributes.Public ;
+ cctor.Attributes = MemberAttributes.Public;
cpde = new CodeParameterDeclarationExpression();
cpde.Name = baseTypeParam;
cpde.Type = new CodeTypeReference("System.Type");
ccc.BaseTypes.Add("System.Object");
ccc.BaseTypes.Add("ICollection");
- ccc.TypeAttributes =TypeAttributes.NestedPublic ;
+ ccc.TypeAttributes =TypeAttributes.NestedPublic;
cf = new CodeMemberField();
cf.Name = strObjectCollection;
//private ManagementObjectCollection.ManagementObjectEnumerator ObjectEnumerator;
cf = new CodeMemberField();
cf.Name = strObjectEnumerator;
- cf.Attributes = MemberAttributes.Private | MemberAttributes.Final ;
+ cf.Attributes = MemberAttributes.Private | MemberAttributes.Final;
cf.Type = new CodeTypeReference(strManagementObjectCollectionType+"."+
strManagementObjectEnumeratorType);
ecc.Members.Add(cf);
strToAdd = "l";
}
- for (int i=0;i < str.Length;i++)
+ for (int i=0; i < str.Length; i++)
{
bAdd = true;
if (char.IsLetterOrDigit(arrString[i]) == false)
string strToAdd = string.Empty;
IFormatProvider formatProv = (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(int));
- for ( int i = 0 ; i < arrIn.Count ; i++)
+ for ( int i = 0; i < arrIn.Count; i++)
{
strToAdd = arrIn[i].ToString();
strToAdd = ResolveCollision(strToAdd, true);
case CodeLanguage.CSharp:
strProvider = "C#.";
- cp= new CSharpCodeProvider() ;
+ cp= new CSharpCodeProvider();
break;
case CodeLanguage.VJSharp:
strTemp = string.Empty;
char[] arrString = bitMap.ToCharArray();
int Len = bitMap.Length;
- for (int i = 2 ; i < Len ; i++)
+ for (int i = 2; i < Len; i++)
{
strTemp = strTemp + arrString[i];
}
string strRetVar = "strRet";
cmp = new CodeMemberProperty ();
cmp.Name = PublicNamesUsed["ClassNameProperty"].ToString();
- cmp.Attributes = MemberAttributes.Public | MemberAttributes.Final ;
+ cmp.Attributes = MemberAttributes.Public | MemberAttributes.Final;
cmp.Type = new CodeTypeReference("System.String");
caa = new CodeAttributeArgument();
cmm = new CodeMemberMethod ();
cmm.Name = PrivateNamesUsed["ClassNameCheckFunc"].ToString();
- cmm.Attributes = MemberAttributes.Private | MemberAttributes.Final ;
+ cmm.Attributes = MemberAttributes.Private | MemberAttributes.Final;
cmm.ReturnType = new CodeTypeReference("System.Boolean");
cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()), PrivateNamesUsed["ScopeParam"].ToString()));
cmm = new CodeMemberMethod ();
cmm.Name = PrivateNamesUsed["ClassNameCheckFunc"].ToString();
- cmm.Attributes = MemberAttributes.Private | MemberAttributes.Final ;
+ cmm.Attributes = MemberAttributes.Private | MemberAttributes.Final;
cmm.ReturnType = new CodeTypeReference("System.Boolean");
cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["BaseObjClass"].ToString()), strTempObj));
string strScope = "mgmtScope";
string strPath = "mgmtPath";
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static ;
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final | MemberAttributes.Static;
cmm.Name = PublicNamesUsed["CreateInst"].ToString();
cmm.ReturnType = new CodeTypeReference(PrivateNamesUsed["GeneratedClassName"].ToString());
{
cmm = new CodeMemberMethod();
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final ;
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final;
cmm.Name = PublicNamesUsed["DeleteInst"].ToString();
caa = new CodeAttributeArgument();
//
// Ensure we are able to trap exceptions from worker thread.
//
- ThreadDispatch disp = new ThreadDispatch ( new ThreadDispatch.ThreadWorkerMethod ( HackToCreateWmiEventSink ) ) ;
- disp.Start ( ) ;
+ ThreadDispatch disp = new ThreadDispatch ( new ThreadDispatch.ThreadWorkerMethod ( HackToCreateWmiEventSink ) );
+ disp.Start ( );
return wmiEventSinkNew;
}
}
// Fire Completed event
- CompletedEventArgs args2 = null ;
+ CompletedEventArgs args2 = null;
if ( errObj != null )
{
args2 = new CompletedEventArgs (context, hResult,
//
// Ensure we are able to trap exceptions from worker thread.
//
- ThreadDispatch disp = new ThreadDispatch ( new ThreadDispatch.ThreadWorkerMethod ( HackToCreateWmiGetEventSink ) ) ;
- disp.Start ( ) ;
+ ThreadDispatch disp = new ThreadDispatch ( new ThreadDispatch.ThreadWorkerMethod ( HackToCreateWmiGetEventSink ) );
+ disp.Start ( );
return wmiGetEventSinkNew;
}
private const string EnvNoProxyUC = "NO_PROXY";
private const string EnvCGI = "GATEWAY_INTERFACE"; // Running in a CGI environment.
- private readonly Uri _httpProxyUri; // String URI for HTTP requests
- private readonly Uri _httpsProxyUri; // String URI for HTTPS requests
- private readonly string[] _bypass = null;// list of domains not to proxy
+ private readonly Uri _httpProxyUri; // String URI for HTTP requests
+ private readonly Uri _httpsProxyUri; // String URI for HTTPS requests
+ private readonly string[] _bypass = null; // list of domains not to proxy
private readonly ICredentials _credentials;
private HttpEnvironmentProxy(Uri httpProxy, Uri httpsProxy, string bypassList)
uint size = 4096;
ulong requestId = 0;
memoryBlob = new SyncRequestContext((int)size);
- for (;;)
+ while (true)
{
- for (;;)
+ while (true)
{
if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"Calling Interop.HttpApi.HttpReceiveHttpRequest RequestId: {requestId}");
uint bytesTransferred = 0;
if (offset + count > buffer.Length)
throw new ArgumentOutOfRangeException(nameof(count));
- for (;;)
+ while (true)
{
// read data from the underlying stream
int read = base.Read(buffer, offset, count);
// do not append a space when writing from a stream since this means
// it's writing the email body
- for (;;)
+ while (true)
{
written += EncodeBytes(buffer, offset + written, count - written, false, false);
if (written < count)
internal void Read()
{
- for (;;)
+ while (true)
{
IAsyncResult result = _parent.BaseStream.BeginRead(_buffer, _offset, _count, s_onRead, this);
if (!result.CompletedSynchronously || CompleteRead(result))
internal void Write()
{
- for (;;)
+ while (true)
{
// do not append a space when writing from a stream since this means
// it's writing the email body
private bool AuthenticateContinue()
{
- for (;;)
+ while (true)
{
// We don't need credential on the continued auth assuming they were captured on the first call.
// That should always work, otherwise what if a new credential has been returned?
}
int written = 0;
- for (;;)
+ while (true)
{
written += EncodeBytes(buffer, offset + written, count - written);
if (written < count)
internal void Write()
{
- for (;;)
+ while (true)
{
_written += _parent.EncodeBytes(_buffer, _offset + _written, _count - _written);
if (_written < _count)
}
int written = 0;
- for (;;)
+ while (true)
{
written += EncodeBytes(buffer, offset + written, count - written);
if (written < count)
internal void Write()
{
- for (;;)
+ while (true)
{
_written += _parent.EncodeBytes(_buffer, _offset + _written, _count - _written);
if (_written < _count)
// Return pending and we will continue in the completion port callback.
if (_singleBufferHandleState == SingleBufferHandleState.InProcess)
{
- RegisterToCancelPendingIO(overlapped, cancellationToken);// must happen before we change state to Set to avoid race conditions
+ RegisterToCancelPendingIO(overlapped, cancellationToken); // must happen before we change state to Set to avoid race conditions
_singleBufferHandle = _buffer.Pin();
_singleBufferHandleState = SingleBufferHandleState.Set;
}
public static bool TryCompleteSendTo(SafeSocketHandle socket, ReadOnlySpan<byte> buffer, IList<ArraySegment<byte>> buffers, ref int bufferIndex, ref int offset, ref int count, SocketFlags flags, byte[] socketAddress, int socketAddressLen, ref int bytesSent, out SocketError errorCode)
{
bool successfulSend = false;
- for (;;)
+ while (true)
{
int sent;
Interop.Error errno;
public static bool TryCompleteSendFile(SafeSocketHandle socket, SafeFileHandle handle, ref long offset, ref long count, ref long bytesSent, out SocketError errorCode)
{
- for (;;)
+ while (true)
{
long sent;
Interop.Error errno;
using (remote)
{
var recvBuffer = new byte[256];
- for (; ; )
+ while (true)
{
int received = remote.Receive(recvBuffer, 0, recvBuffer.Length, SocketFlags.None);
if (received == 0)
if (!useMultipleBuffers)
{
var recvBuffer = new byte[256];
- for (; ; )
+ while (true)
{
int received = await ReceiveAsync(remote, new ArraySegment<byte>(recvBuffer));
if (received == 0)
new ArraySegment<byte>(new byte[256], 2, 100),
new ArraySegment<byte>(new byte[1], 0, 0),
new ArraySegment<byte>(new byte[64], 9, 33)};
- for (; ; )
+ while (true)
{
int received = await ReceiveAsync(remote, recvBuffers);
if (received == 0)
using (NetworkStream stream = remote.GetStream())
{
var recvBuffer = new byte[256];
- for (; ; )
+ while (true)
{
int received = await stream.ReadAsync(recvBuffer, 0, recvBuffer.Length);
if (received == 0)
internal class GenericNameProvider : IGenericNameProvider
{
private readonly string _genericTypeName;
- private readonly object[] _genericParams;//Type or DataContract
+ private readonly object[] _genericParams; //Type or DataContract
private readonly IList<int> _nestedParamCounts;
internal GenericNameProvider(Type type)
: this(DataContract.GetClrTypeFullName(type.GetGenericTypeDefinition()), type.GetGenericArguments())
{
if (isNullableOfT)
{
- memberValue = UnwrapNullableObject(memberValue);//Leaves !HasValue on stack
+ memberValue = UnwrapNullableObject(memberValue); //Leaves !HasValue on stack
memberType = memberValue.LocalType;
}
else
_ilg.Pop();
_ilg.Call(XmlFormatGeneratorStatics.GetDefaultValueMethod.MakeGenericMethod(memberType));
_ilg.Stloc(memberValue);
- _ilg.Load(true);//isNull
+ _ilg.Load(true); //isNull
_ilg.MarkLabel(end);
return memberValue;
}
if (hasUnicode && iriParsing && hostNotUnicodeNormalized)
{
- flags |= Flags.HostUnicodeNormalized;// no host
+ flags |= Flags.HostUnicodeNormalized; // no host
}
return idx;
== (Flags.SchemeNotCanonical | Flags.AuthorityFound))
{
idx = (ushort)_syntax.SchemeName.Length;
- while (str[idx++] != ':') ;
+ while (str[idx++] != ':');
if (idx + 1 >= _string.Length || str[idx] != '/' || str[idx + 1] != '/')
return false;
}
internal const string RFC3986ReservedMarks = @";/?:@&=+$,#[]!'()*";
private const string RFC2396ReservedMarks = @";/?:@&=+$,";
private const string RFC3986UnreservedMarks = @"-_.~";
- private const string AdditionalUnsafeToUnescape = @"%\#";// While not specified as reserved, these are still unsafe to unescape.
+ private const string AdditionalUnsafeToUnescape = @"%\#"; // While not specified as reserved, these are still unsafe to unescape.
// When unescaping in safe mode, do not unescape the RFC 3986 reserved set:
// gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
//the decimal digits, from the
//lowest significant to highest significant
- int iDigits = 0;//Number of significant digits
+ int iDigits = 0; //Number of significant digits
uint ulRem; //Remainder of a division by x_ulBase10, i.e.,least significant digit
// Build the final numeric string by inserting the sign, reversing
private void FinishCDATA()
{
- for (;;)
+ while (true)
{
switch (PeekToken())
{
if (!attr)
{
// scan if this is whitespace
- for (;;)
+ while (true)
{
int posNext = pos + 2;
if (posNext > end)
}
}
- for (;;)
+ while (true)
{
char ch;
- for (;;)
+ while (true)
{
int posNext = pos + 2;
if (posNext > end)
XPathStep[] steps = new XPathStep[stepCount];
pos = 0;
int i = 0;
- for (;;) {
+ while (true) {
if (pos >= xpath.Length)
throw new XmlException(SR.XmlDataBinding_XPathEnd, (string[])null);
if ('/' != xpath[pos])
char* pDst = pDstBegin + bufPos;
char ch = (char)0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
char* pDst = pDstBegin + bufPos;
char ch = (char)0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
byte* pDst = pDstBegin + bufPos;
char ch = (char)0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
byte* pDst = pDstBegin + bufPos;
char ch = (char)0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
}
_decoder.SetNextOutputBuffer(buffer, index, count);
- for (;;)
+ while (true)
{
// use streaming ReadValueChunk if the reader supports it
if (_canReadValueChunk)
{
- for (;;)
+ while (true)
{
if (_valueOffset < _valueChunkLength)
{
}
_decoder.SetNextOutputBuffer(buffer, index, count);
- for (;;)
+ while (true)
{
// use streaming ReadValueChunk if the reader supports it
if (_canReadValueChunk)
{
- for (;;)
+ while (true)
{
if (_valueOffset < _valueChunkLength)
{
char* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
char* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
char* pSrc = pSrcBegin;
int ch = 0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
char* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
char* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
char* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
fixed (char* pSrc = s)
{
char* pS = pSrc;
- while ((*pDst++ = (char)*pS++) != 0) ;
+ while ((*pDst++ = (char)*pS++) != 0);
}
pDst[-1] = (char)';';
char* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
char* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
char* pSrc = pSrcBegin;
int ch = 0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
char* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
char* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
char* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
char* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
int endPos = offset + count;
int i = offset;
char ch = (char)0;
- for (;;)
+ while (true)
{
int startPos = i;
unsafe
int i = 0;
int startPos = 0;
char ch = (char)0;
- for (;;)
+ while (true)
{
unsafe
{
}
char[] helperBuffer = new char[256];
- for (;;)
+ while (true)
{
if (startPos < i)
{
int i = 0;
char ch = (char)0;
- for (;;)
+ while (true)
{
unsafe
{
FinishInit();
}
- for (;;)
+ while (true)
{
switch (_parsingFunction)
{
int xmlDeclState = 0; // <?xml (0) version='1.0' (1) encoding='__' (2) standalone='__' (3) ?>
Encoding encoding = null;
- for (;;)
+ while (true)
{
int originalSbLen = sb.Length;
int wsCount = EatWhitespaces(xmlDeclState == 0 ? null : sb);
if (CompatibilitySwitches.IsAppEarlierThanWindowsPhone8)
mangoQuirks = true;
#endif
- for (;;)
+ while (true)
{
bool needMoreChars = false;
int pos = _ps.charPos;
// Parses element content
private bool ParseElementContent()
{
- for (;;)
+ while (true)
{
int pos = _ps.charPos;
char[] chars = _ps.chars;
unsafe
{
// parse element name
- for (;;)
+ while (true)
{
if (_xmlCharType.IsNCNameSingleChar(chars[pos]))
{
LineInfo endTagLineInfo = new LineInfo(_ps.lineNo, _ps.LinePos);
int pos;
- for (;;)
+ while (true)
{
pos = _ps.charPos + nameLen;
chars = _ps.chars;
Debug.Assert(_attrCount == 0);
- for (;;)
+ while (true)
{
// eat whitespace
int lineNoDelta = 0;
unsafe
{
- for (;;)
+ while (true)
{
if (_xmlCharType.IsNCNameSingleChar(tmpch2 = chars[pos]))
{
Debug.Assert(_stringBuilder.Length == 0);
- for (;;)
+ while (true)
{
// parse the rest of the attribute value
unsafe
// skip over the text if not in full parsing mode
if (_parsingMode != ParsingMode.Full)
{
- while (!ParseText(out startPos, out endPos, ref orChars)) ;
+ while (!ParseText(out startPos, out endPos, ref orChars));
goto IgnoredNode;
}
_stringBuilder.Length = 0;
if (!fullValue)
{
- while (!ParseText(out startPos, out endPos, ref orChars)) ;
+ while (!ParseText(out startPos, out endPos, ref orChars));
}
goto IgnoredNode;
}
int orChars = outOrChars;
char c;
- for (;;)
+ while (true)
{
// parse text content
unsafe
int orChars = 0;
_parsingFunction = _nextParsingFunction;
- while (!ParseText(out startPos, out endPos, ref orChars)) ;
+ while (!ParseText(out startPos, out endPos, ref orChars));
}
private void FinishReadValueChunk()
}
if (_incReadState != IncrementalReadState.ReadContentAsBinary_End)
{
- while (MoveToNextContentNode(true)) ;
+ while (MoveToNextContentNode(true));
}
}
{
if (_ignorePIs || _parsingMode != ParsingMode.Full)
{
- while (!ParsePIValue(out startPos, out endPos)) ;
+ while (!ParsePIValue(out startPos, out endPos));
return false;
}
sb = _stringBuilder;
int rcount = 0;
int rpos = -1;
- for (;;)
+ while (true)
{
char tmpch;
unsafe
}
else
{
- while (!ParseCDataOrComment(type, out startPos, out endPos)) ;
+ while (!ParseCDataOrComment(type, out startPos, out endPos));
}
}
int rpos = -1;
char stopChar = (type == XmlNodeType.Comment) ? '-' : ']';
- for (;;)
+ while (true)
{
char tmpch;
unsafe
char[] chars = _ps.chars;
int pos = _ps.charPos;
- for (;;)
+ while (true)
{
char ch;
int wsCount = 0;
char[] chars = _ps.chars;
- for (;;)
+ while (true)
{
- for (;;)
+ while (true)
{
switch (chars[pos])
{
// - if (expand == true) then ps.charPos is changed to point to the replaced character
private int ParseNumericCharRef(bool expand, StringBuilder internalSubsetBuilder, out EntityType entityType)
{
- for (;;)
+ while (true)
{
int newPos;
int charCount;
pos++;
digitPos = pos;
badDigitExceptionString = SR.Xml_BadHexEntity;
- for (;;)
+ while (true)
{
char ch = chars[pos];
if (ch >= '0' && ch <= '9')
// - if (expand == true) then ps.charPos is changed to point to the replaced character
private int ParseNamedCharRef(bool expand, StringBuilder internalSubsetBuilder)
{
- for (;;)
+ while (true)
{
int newPos;
switch (newPos = ParseNamedCharRefInline(_ps.charPos, expand, internalSubsetBuilder))
// parse name
unsafe
{
- for (;;)
+ while (true)
{
if (_xmlCharType.IsNCNameSingleChar(chars[pos]))
{
int startPos = 0;
int pos = 0;
- for (;;)
+ while (true)
{
switch (_incReadState)
{
startPos = _ps.charPos;
pos = startPos;
- for (;;)
+ while (true)
{
_incReadLineInfo.Set(_ps.LineNo, _ps.LinePos);
}
else
{
- ;//Throw( );
+ ; //Throw( );
}
break;
// end tag
Debug.Assert(_stringBuilder.Length == 0);
- for (;;)
+ while (true)
{
unsafe
{
_incReadDecoder.SetNextOutputBuffer(buffer, index, count);
- for (;;)
+ while (true)
{
// read what is already cached in curNode
int charsRead = 0;
return FinishInitAsync().CallBoolTaskFuncWhenFinishAsync(thisRef => thisRef.ReadAsync(), this);
}
- for (;;)
+ while (true)
{
switch (_parsingFunction)
{
int xmlDeclState = 0; // <?xml (0) version='1.0' (1) encoding='__' (2) standalone='__' (3) ?>
Encoding encoding = null;
- for (;;)
+ while (true)
{
int originalSbLen = sb.Length;
int wsCount = await EatWhitespacesAsync(xmlDeclState == 0 ? null : sb).ConfigureAwait(false);
// Parses the document content, no async keyword for perf optimize
private Task<bool> ParseDocumentContentAsync()
{
- for (;;)
+ while (true)
{
bool needMoreChars = false;
int pos = _ps.charPos;
// Parses element content
private Task<bool> ParseElementContentAsync()
{
- for (;;)
+ while (true)
{
int pos = _ps.charPos;
char[] chars = _ps.chars;
unsafe
{
// parse element name
- for (;;)
+ while (true)
{
if (_xmlCharType.IsNCNameSingleChar(chars[pos]))
{
{
int pos;
char[] chars;
- for (;;)
+ while (true)
{
pos = _ps.charPos + nameLen;
chars = _ps.chars;
Debug.Assert(_attrCount == 0);
- for (;;)
+ while (true)
{
// eat whitespace
int lineNoDelta = 0;
unsafe
{
- for (;;)
+ while (true)
{
if (_xmlCharType.IsNCNameSingleChar(tmpch2 = chars[pos]))
{
Debug.Assert(_stringBuilder.Length == 0);
- for (;;)
+ while (true)
{
// parse the rest of the attribute value
while (_xmlCharType.IsAttributeValueChar(chars[pos]))
private Task<ValueTuple<int, int, int, bool>> ParseTextAsync(int outOrChars, char[] chars, int pos, int rcount, int rpos, int orChars, char c)
{
- for (;;)
+ while (true)
{
// parse text content
while (_xmlCharType.IsTextChar(c = chars[pos]))
int rcount = 0;
int rpos = -1;
- for (;;)
+ while (true)
{
char tmpch;
int rpos = -1;
char stopChar = (type == XmlNodeType.Comment) ? '-' : ']';
- for (;;)
+ while (true)
{
char tmpch;
while (_xmlCharType.IsTextChar(tmpch = chars[pos]) && tmpch != stopChar)
char[] chars = _ps.chars;
int pos = _ps.charPos;
- for (;;)
+ while (true)
{
char ch;
int wsCount = 0;
char[] chars = _ps.chars;
- for (;;)
+ while (true)
{
- for (;;)
+ while (true)
{
switch (chars[pos])
{
{
EntityType entityType;
- for (;;)
+ while (true)
{
int newPos;
int charCount;
// - if (expand == true) then ps.charPos is changed to point to the replaced character
private async Task<int> ParseNamedCharRefAsync(bool expand, StringBuilder internalSubsetBuilder)
{
- for (;;)
+ while (true)
{
int newPos;
switch (newPos = ParseNamedCharRefInline(_ps.charPos, expand, internalSubsetBuilder))
// parse name
unsafe
{
- for (;;)
+ while (true)
{
if (_xmlCharType.IsNCNameSingleChar(chars[pos]))
{
_incReadDecoder.SetNextOutputBuffer(buffer, index, count);
- for (;;)
+ while (true)
{
// read what is already cached in curNode
int charsRead = 0;
_nsTop = -1;
// element stack
_stack = new TagInfo[10];
- _top = 0;// 0 is an empty sentanial element
+ _top = 0; // 0 is an empty sentanial element
_stack[_top].Init(-1);
_quoteChar = '"';
byte* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
byte* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
char* pSrc = pSrcBegin;
int ch = 0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
byte* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
byte* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
byte* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
byte* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
byte* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
char* pSrc = pSrcBegin;
int ch = 0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
byte* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
byte* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
byte* pDst = pDstBegin + bufPos;
int ch = 0;
- for (;;)
+ while (true)
{
byte* pDstEnd = pDst + (pSrcEnd - pSrc);
if (pDstEnd > pDstBegin + bufLen)
{
if (!_outerReader.IsEmptyElement)
{
- for (;;)
+ while (true)
{
if (!_outerReader.Read())
{
public override void MoveToRoot()
{
- for (;;)
+ while (true)
{
XmlNode parent = _source.ParentNode;
if (parent == null)
}
else
{
- for (;;)
+ while (true)
{
XmlNode nextSibling = following.NextSibling;
if (nextSibling != null)
}
else
{
- for (;;)
+ while (true)
{
XmlNode nextSibling = following.NextSibling;
if (nextSibling != null)
internal static bool IsFollowingSibling(XmlNode left, XmlNode right)
{
- for (;;)
+ while (true)
{
left = left.NextSibling;
if (left == null)
private static bool IsDescendant(XmlNode top, XmlNode bottom)
{
- for (;;)
+ while (true)
{
XmlNode parent = bottom.ParentNode;
if (parent == null)
public override bool MoveNext()
{
- for (;;)
+ while (true)
{
if (_nav.MoveToFirstChild())
{
private void ParseSubset()
{
int startTagEntityId;
- for (;;)
+ while (true)
{
Token token = GetToken(false);
startTagEntityId = _currentEntityId;
}
SchemaAttDef attrDef = null;
- for (;;)
+ while (true)
{
switch (GetToken(false))
{
elementDecl.ContentValidator.ContentType == XmlSchemaContentType.Empty &&
!ignoreErrors)
{
- SendValidationEvent(_curPos - 8, XmlSeverityType.Error, SR.Sch_NotationAttributeOnEmptyElement, elementDecl.Name.ToString());// 8 == strlen("NOTATION")
+ SendValidationEvent(_curPos - 8, XmlSeverityType.Error, SR.Sch_NotationAttributeOnEmptyElement, elementDecl.Name.ToString()); // 8 == strlen("NOTATION")
}
elementDecl.IsNotationDeclared = true;
}
{
goto UnexpectedError;
}
- for (;;)
+ while (true)
{
string notationName = GetNameString();
if (!_schemaInfo.Notations.ContainsKey(notationName))
goto UnexpectedError;
attrDef.AddValue(GetNameString());
- for (;;)
+ while (true)
{
switch (GetToken(false))
{
int connectorEntityId = -1;
int contentEntityId = _currentEntityId;
- for (;;)
+ while (true)
{
switch (GetToken(false))
{
private Token GetToken(bool needWhiteSpace)
{
_whitespaceSeen = false;
- for (;;)
+ while (true)
{
switch (_chars[_curPos])
{
private Token ScanSubsetContent()
{
- for (;;)
+ while (true)
{
switch (_chars[_curPos])
{
private Token ScanElement1()
{
- for (;;)
+ while (true)
{
switch (_chars[_curPos])
{
private Token ScanAttlist2()
{
- for (;;)
+ while (true)
{
switch (_chars[_curPos])
{
private Token ScanAttlist6()
{
- for (;;)
+ while (true)
{
switch (_chars[_curPos])
{
_stringBuilder.Length = 0;
- for (;;)
+ while (true)
{
while (_xmlCharType.IsAttributeValueChar(_chars[_curPos]) && _chars[_curPos] != '%')
{
}
_curPos++;
- for (;;)
+ while (true)
{
if (_charsUsed - _curPos < 5)
{
int ignoreSectionDepth = 0;
// skip ignored part
- for (;;)
+ while (true)
{
while (_xmlCharType.IsTextChar(_chars[_curPos]) && _chars[_curPos] != ']')
{
_tokenStartPos = _curPos;
int colonOffset = -1;
- for (;;)
+ while (true)
{
unsafe
{
unsafe
{
- for (;;)
+ while (true)
{
if (_xmlCharType.IsNCNameSingleChar(_chars[_curPos]))
{
{
_tokenStartPos = _curPos;
- for (;;)
+ while (true)
{
unsafe
{
- for (;;)
+ while (true)
{
if (_xmlCharType.IsNCNameSingleChar(_chars[_curPos]) || _chars[_curPos] == ':')
{
)
{ // postpone the proper surrogate checking to the loop below
int endPos = startPos;
- for (;;)
+ while (true)
{
if (_xmlCharType.IsNCNameSingleChar(_chars[endPos]))
{
private async Task ParseSubsetAsync()
{
int startTagEntityId;
- for (;;)
+ while (true)
{
Token token = await GetTokenAsync(false).ConfigureAwait(false);
startTagEntityId = _currentEntityId;
}
SchemaAttDef attrDef = null;
- for (;;)
+ while (true)
{
switch (await GetTokenAsync(false).ConfigureAwait(false))
{
elementDecl.ContentValidator.ContentType == XmlSchemaContentType.Empty &&
!ignoreErrors)
{
- SendValidationEvent(_curPos - 8, XmlSeverityType.Error, SR.Sch_NotationAttributeOnEmptyElement, elementDecl.Name.ToString());// 8 == strlen("NOTATION")
+ SendValidationEvent(_curPos - 8, XmlSeverityType.Error, SR.Sch_NotationAttributeOnEmptyElement, elementDecl.Name.ToString()); // 8 == strlen("NOTATION")
}
elementDecl.IsNotationDeclared = true;
}
{
goto UnexpectedError;
}
- for (;;)
+ while (true)
{
string notationName = GetNameString();
if (!_schemaInfo.Notations.ContainsKey(notationName))
goto UnexpectedError;
attrDef.AddValue(GetNameString());
- for (;;)
+ while (true)
{
switch (await GetTokenAsync(false).ConfigureAwait(false))
{
int connectorEntityId = -1;
int contentEntityId = _currentEntityId;
- for (;;)
+ while (true)
{
switch (await GetTokenAsync(false).ConfigureAwait(false))
{
private async Task<Token> GetTokenAsync(bool needWhiteSpace)
{
_whitespaceSeen = false;
- for (;;)
+ while (true)
{
switch (_chars[_curPos])
{
private async Task<Token> ScanSubsetContentAsync()
{
- for (;;)
+ while (true)
{
switch (_chars[_curPos])
{
private async Task<Token> ScanElement1Async()
{
- for (;;)
+ while (true)
{
switch (_chars[_curPos])
{
private async Task<Token> ScanAttlist2Async()
{
- for (;;)
+ while (true)
{
switch (_chars[_curPos])
{
private async Task<Token> ScanAttlist6Async()
{
- for (;;)
+ while (true)
{
switch (_chars[_curPos])
{
_stringBuilder.Length = 0;
- for (;;)
+ while (true)
{
while (_xmlCharType.IsAttributeValueChar(_chars[_curPos]) && _chars[_curPos] != '%')
{
}
_curPos++;
- for (;;)
+ while (true)
{
if (_charsUsed - _curPos < 5)
{
int ignoreSectionDepth = 0;
// skip ignored part
- for (;;)
+ while (true)
{
while (_xmlCharType.IsTextChar(_chars[_curPos]) && _chars[_curPos] != ']')
{
_tokenStartPos = _curPos;
int colonOffset = -1;
- for (;;)
+ while (true)
{
//a tmp flag, used to avoid await keyword in unsafe context.
bool awaitReadDataInNameAsync = false;
ContinueName:
unsafe
{
- for (;;)
+ while (true)
{
if (_xmlCharType.IsNCNameSingleChar(_chars[_curPos]))
{
{
_tokenStartPos = _curPos;
- for (;;)
+ while (true)
{
unsafe
{
- for (;;)
+ while (true)
{
if (_xmlCharType.IsNCNameSingleChar(_chars[_curPos]) || _chars[_curPos] == ':')
{
{
//more than one consecutive text nodes probably with PI in between
xse.SchemaTypeName = ST_string;
- xse.LineNumber = TF_string;// we use LineNumber to store flags of valid types
+ xse.LineNumber = TF_string; // we use LineNumber to store flags of valid types
}
else
{
else
{
xse.SchemaTypeName = ST_string;
- xse.LineNumber = TF_string;// we use LineNumber to store flags of valid types
+ xse.LineNumber = TF_string; // we use LineNumber to store flags of valid types
}
else if (_xtr.NodeType == XmlNodeType.Text)
{
else
{
xse.SchemaTypeName = ST_string;
- xse.LineNumber = TF_string;// we use LineNumber to store flags of valid types
+ xse.LineNumber = TF_string; // we use LineNumber to store flags of valid types
}
}
}
{
Parser parser = new Parser(SchemaType.XSD, NameTable, SchemaNames, EventHandler);
parser.Parse(reader, null);
- while (reader.Read()) ;// wellformness check
+ while (reader.Read()) ; // wellformness check
includedSchema = parser.XmlSchema;
include.Schema = includedSchema;
_schemaLocations.Add(ruri, includedSchema);
{
Parser parser = new Parser(SchemaType.XSD, NameTable, SchemaNames, EventHandler);
parser.Parse(reader, null);
- while (reader.Read()) ;// wellformness check
+ while (reader.Read()) ; // wellformness check
include.Schema = parser.XmlSchema;
LoadExternals(include.Schema, xsc);
}
Parser parser = new Parser(SchemaType.XDR, NameTable, SchemaNames, EventHandler);
parser.XmlResolver = this.XmlResolver;
parser.Parse(reader, uri);
- while (reader.Read()) ;// wellformness check
+ while (reader.Read()) ; // wellformness check
xdrSchema = parser.XdrSchema;
}
catch (XmlSchemaException e)
try
{
schema = Add(ns, reader, _xmlResolver);
- while (reader.Read()) ;// wellformness check
+ while (reader.Read()) ; // wellformness check
}
finally
{
try
{
schema = Add(targetNamespace, ParseSchema(targetNamespace, reader));
- while (reader.Read()) ;// wellformness check;
+ while (reader.Read()) ; // wellformness check;
}
finally
{
readerSettings.XmlResolver = _xmlResolver;
Reader = XmlReader.Create(stm, readerSettings, ruri.ToString());
_schemaSet.Add(uri, Reader, _validatedNamespaces);
- while (Reader.Read()) ;// wellformness check
+ while (Reader.Read()) ; // wellformness check
}
catch (XmlSchemaException e)
{
//Add to validator's SchemaInfo
SchemaInfo.Add(schemaInfo, EventHandler);
- while (reader.Read()) ;// wellformness check
+ while (reader.Read()) ; // wellformness check
}
catch (XmlSchemaException e)
{
memberMapping.TypeDesc = arrayMapping.TypeDesc;
memberMapping.ReadOnly = readOnly;
Member member = new Member(this, source, arrayName, 0, memberMapping, false);
- member.IsNullable = false;//Note, sowmys: IsNullable is set to false since null condition (xsi:nil) is already handled by 'ReadNull()'
+ member.IsNullable = false; // Note, sowmys: IsNullable is set to false since null condition (xsi:nil) is already handled by 'ReadNull()'
Member[] members = new Member[] { member };
WriteMemberBegin(members);
{
outputBuffer.Clear();
count = 0;
- return input.Evaluate(context);// This is trick. IDQuery needs this value. Otherwise we would return this.
- // All subclasses should and would anyway override this method and return this.
+ return input.Evaluate(context); // This is trick. IDQuery needs this value. Otherwise we would return this.
+ // All subclasses should and would anyway override this method and return this.
}
public override XPathNavigator Advance()
int start = _xpathExprIndex - 1;
int len = 0;
- for (;;)
+ while (true)
{
if (_xmlCharType.IsNCNameSingleChar(this.CurrentChar))
{
else
{
XPathNavigator prev = nav.Clone();
- for (;;)
+ while (true)
{
if (!nav.MoveToNextNamespace(XPathNamespaceScope.Local))
{
int i = 0;
int len = data.Length;
- for (;;)
+ while (true)
{
while (i < len && s_xmlCharType.IsCharData(data[i]))
{
int i = offset;
int endPos = offset + len;
- for (;;)
+ while (true)
{
while (i < endPos && s_xmlCharType.IsCharData(data[i]))
{
#endif
);
int start = _curIndex;
- for (;;)
+ while (true)
{
if (_xmlCharType.IsNCNameSingleChar(_curChar))
{
bool fRetry = false;
- for (; ;)
+ while (true)
{
try
{
}
string name = member.Name;
TypeInfo typeInfo = member.DeclaringType.GetTypeInfo();
- for (;;)
+ while (true)
{
Type baseType = typeInfo.BaseType;
if (baseType == null)
private volatile ConstructorInfo _lazyConstructorInfo;
public abstract override IList<CustomAttributeTypedArgument> ConstructorArguments { get; }
- public abstract override IList<CustomAttributeNamedArgument> NamedArguments { get;}
+ public abstract override IList<CustomAttributeNamedArgument> NamedArguments { get; }
public sealed override string ToString() => GetType().ToString(); // Does not match NETFX output - however, doing so can prematurely
// trigger resolve handlers. Too impactful for ToString().
}
return true;
Type walk = fromTypeInfo;
- for (;;)
+ while (true)
{
Type baseType = walk.BaseType;
if (baseType == null)
if (namedArgument.IsField)
{
// Field
- for (;;)
+ while (true)
{
FieldInfo fieldInfo = walk.GetField(name, BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly);
if (fieldInfo != null)
else
{
// Property
- for (;;)
+ while (true)
{
PropertyInfo propertyInfo = walk.GetProperty(name, BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly);
if (propertyInfo != null)
int pageIndexNext;
ExpiresEntry[] entries;
- for (; ;)
+ while (true)
{
pageIndexNext = (_pages[(pageIndexCurrent)]._pageNext);
pageIndexCurrent = pageIndexNext;
}
- for (; ;)
+ while (true)
{
if (_freeEntryList._tail == -1)
break;
int pageIndexNext;
UsageEntry[] entries;
- for (; ;)
+ while (true)
{
pageIndexNext = (_pages[(pageIndexCurrent)]._pageNext);
pageIndexCurrent = pageIndexNext;
}
- for (; ;)
+ while (true)
{
if (_freeEntryList._tail == -1)
break;
}
set
{
- for (; ;)
+ while (true)
{
int oldData = _data;
int newData;
internal bool ChangeValue(int bit, bool value)
{
- for (; ;)
+ while (true)
{
int oldData = _data;
int newData;
// Try to conserve space as much as possible by checking for wasted leading uint[] entries
// sometimes the uint[] has leading zeros from bit manipulation operations & and ^
- for (len = value.Length; len > 0 && value[len - 1] == 0; len--) ;
+ for (len = value.Length; len > 0 && value[len - 1] == 0; len--);
if (len == 0)
this = s_bnZeroInt;
if ((pr._objectInfo != null) && pr._objectInfo._objectType != null && (pr._objectInfo._objectType.IsValueType))
{
pr._isValueTypeFixup = true; //Valuefixup
- ValueFixupStack.Push(new ValueFixup(objectPr._newObj, pr._name, objectPr._objectInfo));//valuefixup
+ ValueFixupStack.Push(new ValueFixup(objectPr._newObj, pr._name, objectPr._objectInfo)); //valuefixup
}
else
{
Debug.Assert(_startingVersion == _list.Version, "[ObjectHolderListEnumerator.MoveNext]m_startingVersion==m_list.Version");
if (_isFixupEnumerator)
{
- while (++_currPos < _list.Count && _list._values[_currPos].CompletelyFixed) ;
+ while (++_currPos < _list.Count && _list._values[_currPos].CompletelyFixed);
return _currPos != _list.Count;
}
else
// Important: Not all combinations of inheritance bits are valid
//
- afToPm[( int )( 0 | 0 | 0 | 0 )] = PM.F | 0 | 0 | 0 | 0 ;
- afToPm[( int )( 0 | AF.OI | 0 | 0 )] = PM.F | 0 | PM.CO | 0 | PM.GO ;
- afToPm[( int )( 0 | AF.OI | 0 | AF.NP )] = PM.F | 0 | PM.CO | 0 | 0 ;
- afToPm[( int )( 0 | AF.OI | AF.IO | 0 )] = 0 | 0 | PM.CO | 0 | PM.GO ;
- afToPm[( int )( 0 | AF.OI | AF.IO | AF.NP )] = 0 | 0 | PM.CO | 0 | 0 ;
- afToPm[( int )( AF.CI | 0 | 0 | 0 )] = PM.F | PM.CF | 0 | PM.GF | 0 ;
- afToPm[( int )( AF.CI | 0 | 0 | AF.NP )] = PM.F | PM.CF | 0 | 0 | 0 ;
- afToPm[( int )( AF.CI | 0 | AF.IO | 0 )] = 0 | PM.CF | 0 | PM.GF | 0 ;
- afToPm[( int )( AF.CI | 0 | AF.IO | AF.NP )] = 0 | PM.CF | 0 | 0 | 0 ;
- afToPm[( int )( AF.CI | AF.OI | 0 | 0 )] = PM.F | PM.CF | PM.CO | PM.GF | PM.GO ;
- afToPm[( int )( AF.CI | AF.OI | 0 | AF.NP )] = PM.F | PM.CF | PM.CO | 0 | 0 ;
- afToPm[( int )( AF.CI | AF.OI | AF.IO | 0 )] = 0 | PM.CF | PM.CO | PM.GF | PM.GO ;
- afToPm[( int )( AF.CI | AF.OI | AF.IO | AF.NP )] = 0 | PM.CF | PM.CO | 0 | 0 ;
+ afToPm[( int )( 0 | 0 | 0 | 0 )] = PM.F | 0 | 0 | 0 | 0;
+ afToPm[( int )( 0 | AF.OI | 0 | 0 )] = PM.F | 0 | PM.CO | 0 | PM.GO;
+ afToPm[( int )( 0 | AF.OI | 0 | AF.NP )] = PM.F | 0 | PM.CO | 0 | 0;
+ afToPm[( int )( 0 | AF.OI | AF.IO | 0 )] = 0 | 0 | PM.CO | 0 | PM.GO;
+ afToPm[( int )( 0 | AF.OI | AF.IO | AF.NP )] = 0 | 0 | PM.CO | 0 | 0;
+ afToPm[( int )( AF.CI | 0 | 0 | 0 )] = PM.F | PM.CF | 0 | PM.GF | 0;
+ afToPm[( int )( AF.CI | 0 | 0 | AF.NP )] = PM.F | PM.CF | 0 | 0 | 0;
+ afToPm[( int )( AF.CI | 0 | AF.IO | 0 )] = 0 | PM.CF | 0 | PM.GF | 0;
+ afToPm[( int )( AF.CI | 0 | AF.IO | AF.NP )] = 0 | PM.CF | 0 | 0 | 0;
+ afToPm[( int )( AF.CI | AF.OI | 0 | 0 )] = PM.F | PM.CF | PM.CO | PM.GF | PM.GO;
+ afToPm[( int )( AF.CI | AF.OI | 0 | AF.NP )] = PM.F | PM.CF | PM.CO | 0 | 0;
+ afToPm[( int )( AF.CI | AF.OI | AF.IO | 0 )] = 0 | PM.CF | PM.CO | PM.GF | PM.GO;
+ afToPm[( int )( AF.CI | AF.OI | AF.IO | AF.NP )] = 0 | PM.CF | PM.CO | 0 | 0;
return afToPm;
}
// the four ACE inheritance bits
//
- pmToAf[( int )( PM.F | 0 | 0 | 0 | 0 )] = 0 | 0 | 0 | 0 ;
- pmToAf[( int )( PM.F | 0 | PM.CO | 0 | PM.GO )] = 0 | AF.OI | 0 | 0 ;
- pmToAf[( int )( PM.F | 0 | PM.CO | 0 | 0 )] = 0 | AF.OI | 0 | AF.NP ;
- pmToAf[( int )( 0 | 0 | PM.CO | 0 | PM.GO )] = 0 | AF.OI | AF.IO | 0 ;
- pmToAf[( int )( 0 | 0 | PM.CO | 0 | 0 )] = 0 | AF.OI | AF.IO | AF.NP ;
- pmToAf[( int )( PM.F | PM.CF | 0 | PM.GF | 0 )] = AF.CI | 0 | 0 | 0 ;
- pmToAf[( int )( PM.F | PM.CF | 0 | 0 | 0 )] = AF.CI | 0 | 0 | AF.NP ;
- pmToAf[( int )( 0 | PM.CF | 0 | PM.GF | 0 )] = AF.CI | 0 | AF.IO | 0 ;
- pmToAf[( int )( 0 | PM.CF | 0 | 0 | 0 )] = AF.CI | 0 | AF.IO | AF.NP ;
- pmToAf[( int )( PM.F | PM.CF | PM.CO | PM.GF | PM.GO )] = AF.CI | AF.OI | 0 | 0 ;
- pmToAf[( int )( PM.F | PM.CF | PM.CO | 0 | 0 )] = AF.CI | AF.OI | 0 | AF.NP ;
- pmToAf[( int )( 0 | PM.CF | PM.CO | PM.GF | PM.GO )] = AF.CI | AF.OI | AF.IO | 0 ;
- pmToAf[( int )( 0 | PM.CF | PM.CO | 0 | 0 )] = AF.CI | AF.OI | AF.IO | AF.NP ;
+ pmToAf[( int )( PM.F | 0 | 0 | 0 | 0 )] = 0 | 0 | 0 | 0;
+ pmToAf[( int )( PM.F | 0 | PM.CO | 0 | PM.GO )] = 0 | AF.OI | 0 | 0;
+ pmToAf[( int )( PM.F | 0 | PM.CO | 0 | 0 )] = 0 | AF.OI | 0 | AF.NP;
+ pmToAf[( int )( 0 | 0 | PM.CO | 0 | PM.GO )] = 0 | AF.OI | AF.IO | 0;
+ pmToAf[( int )( 0 | 0 | PM.CO | 0 | 0 )] = 0 | AF.OI | AF.IO | AF.NP;
+ pmToAf[( int )( PM.F | PM.CF | 0 | PM.GF | 0 )] = AF.CI | 0 | 0 | 0;
+ pmToAf[( int )( PM.F | PM.CF | 0 | 0 | 0 )] = AF.CI | 0 | 0 | AF.NP;
+ pmToAf[( int )( 0 | PM.CF | 0 | PM.GF | 0 )] = AF.CI | 0 | AF.IO | 0;
+ pmToAf[( int )( 0 | PM.CF | 0 | 0 | 0 )] = AF.CI | 0 | AF.IO | AF.NP;
+ pmToAf[( int )( PM.F | PM.CF | PM.CO | PM.GF | PM.GO )] = AF.CI | AF.OI | 0 | 0;
+ pmToAf[( int )( PM.F | PM.CF | PM.CO | 0 | 0 )] = AF.CI | AF.OI | 0 | AF.NP;
+ pmToAf[( int )( 0 | PM.CF | PM.CO | PM.GF | PM.GO )] = AF.CI | AF.OI | AF.IO | 0;
+ pmToAf[( int )( 0 | PM.CF | PM.CO | 0 | 0 )] = AF.CI | AF.OI | AF.IO | AF.NP;
return pmToAf;
}
public abstract class AsymmetricKeyExchangeDeformatter
{
protected AsymmetricKeyExchangeDeformatter() {}
- public abstract string Parameters {get; set;}
+ public abstract string Parameters {get; set; }
public abstract void SetKey(AsymmetricAlgorithm key);
public abstract byte[] DecryptKeyExchange(byte[] rgb);
}
{
protected AsymmetricKeyExchangeFormatter() {}
- public abstract string Parameters {get;}
+ public abstract string Parameters {get; }
public abstract void SetKey(AsymmetricAlgorithm key);
public abstract byte[] CreateKeyExchange(byte[] data);
public override string Parameters
{
- get {return null;}
+ get {return null; }
set { }
}
public override string Parameters
{
- get {return null;}
+ get {return null; }
}
public RandomNumberGenerator Rng {
public override string Parameters
{
- get {return null;}
+ get {return null; }
set { }
}
{
private const int DSS_Q_LEN = 20;
- internal const int DSS_MAGIC = 0x31535344; // Encoding of "DSS1"
- internal const int DSS_PRIVATE_MAGIC = 0x32535344; // Encoding of "DSS2"
- internal const int DSS_PUB_MAGIC_VER3 = 0x33535344; // Encoding of "DSS3"
- internal const int DSS_PRIV_MAGIC_VER3 = 0x34535344;// Encoding of "DSS4"
+ internal const int DSS_MAGIC = 0x31535344; // Encoding of "DSS1"
+ internal const int DSS_PRIVATE_MAGIC = 0x32535344; // Encoding of "DSS2"
+ internal const int DSS_PUB_MAGIC_VER3 = 0x33535344; // Encoding of "DSS3"
+ internal const int DSS_PRIV_MAGIC_VER3 = 0x34535344; // Encoding of "DSS4"
/// <summary>
/// Helper for DsaCryptoServiceProvider.ImportParameters()
[FieldOffset(0x22)]
internal ushort VersionMinor; // WORD
[FieldOffset(0x24)]
- internal ushort VersionRevision;// WORD
+ internal ushort VersionRevision; // WORD
[FieldOffset(0x26)]
internal ushort VersionBuild; // WORD
[FieldOffset(0x28)]
{
int prevat = 0;
- for (; ; )
+ while (true)
{
al.Add(input.Substring(prevat, match.Index - prevat));
{
int prevat = input.Length;
- for (; ; )
+ while (true)
{
al.Add(input.Substring(match.Index + match.Length, prevat - match.Index - match.Length));
int scan;
int match;
- for (; ;)
+ while (true)
{
// find an internal char (examine) that matches the tail
- for (; ;)
+ while (true)
{
if (examine == beforefirst)
goto OuterloopBreak;
// find the length of the match
- for (; ;)
+ while (true)
{
if (scan == beforefirst || pattern[match] != pattern[scan])
{
int advance;
int[] unicodeLookup;
- for (; ;)
+ while (true)
{
if (test >= endlimit || test < beglimit)
return -1;
test2 = test;
match = startmatch;
- for (; ;)
+ while (true)
{
if (match == endmatch)
return (RightToLeft ? test2 + 1 : test2);
RegexNode concatNode = null;
int nextChild = 0;
- for (; ;)
+ while (true)
{
switch (curNode.NType)
{
curNode = tree.Root;
- for (; ;)
+ while (true)
{
switch (curNode.NType)
{
RegexNode curNode = tree.Root;
int curChild = 0;
- for (; ;)
+ while (true)
{
if (curNode.Children == null)
{
Goto(0);
int advance = -1;
- for (; ;)
+ while (true)
{
if (advance >= 0)
{
int min = M;
int max = N;
- for (; ;)
+ while (true)
{
if (u.ChildCount() == 0)
break;
if (j < i)
Children[j] = at;
- for (; ;)
+ while (true)
{
if (at.NType == Alternate)
{
Debug.WriteLine(CurNode.Description());
- for (; ;)
+ while (true)
{
if (CurNode.Children != null && CurChild < CurNode.Children.Count)
{
{
_concatenation = new RegexNode(RegexNode.Concatenate, _options);
- for (; ;)
+ while (true)
{
int c = CharsRight();
if (c == 0)
MoveRight();
- for (; ;)
+ while (true)
{
if (CharsRight() == 0)
break;
{
if (UseOptionX())
{
- for (; ;)
+ while (true)
{
while (CharsRight() > 0 && IsSpace(RightChar()))
MoveRight();
}
else
{
- for (; ;)
+ while (true)
{
if (CharsRight() < 3 || RightChar(2) != '#' ||
RightChar(1) != '?' || RightChar() != '(')
int pos = startpos;
int nChars = CharsRight();
- while (--nChars > 0 && (ch = CharAt(++pos)) >= '0' && ch <= '9') ;
+ while (--nChars > 0 && (ch = CharAt(++pos)) >= '0' && ch <= '9');
if (nChars == 0 || pos - startpos == 1)
return false;
if (ch != ',')
return false;
- while (--nChars > 0 && (ch = CharAt(++pos)) >= '0' && ch <= '9') ;
+ while (--nChars > 0 && (ch = CharAt(++pos)) >= '0' && ch <= '9');
return nChars > 0 && ch == '}';
}
StartTimeoutWatch();
- for (; ;)
+ while (true)
{
#if DEBUG
if (runregex.Debug)
Emit(RegexCode.Lazybranch, 0);
- for (; ; )
+ while (true)
{
if (curNode.Children == null)
{
// We'll bail out of this loop either when we have reserved a message (true)
// or when we have exhausted the list of postponed messages (false)
- for (; ;)
+ while (true)
{
// Try to reserve the popped message
if (next.Key.ReserveMessage(next.Value, this))