if (ret != 0 ) {
return null;
}
- return System.Text.Encoding.UTF8.GetString(pBuffer,(int)bytesLength-1);
+ return System.Text.Encoding.UTF8.GetString(pBuffer, (int)bytesLength-1);
}
/// <summary>
private static readonly SafeCreateHandle s_cfAlpnHttp11Protocols = CoreFoundation.CFArrayCreate(s_cfAlpnHttp11Protocol, (UIntPtr)1);
private static readonly SafeCreateHandle s_cfAlpnHttp2Protocols = CoreFoundation.CFArrayCreate(s_cfAlpnHttp2Protocol, (UIntPtr)1);
- private static readonly SafeCreateHandle s_cfAlpnHttp211Protocols = CoreFoundation.CFArrayCreate(s_cfAlpnHttp211Protocol , (UIntPtr)2);
+ private static readonly SafeCreateHandle s_cfAlpnHttp211Protocols = CoreFoundation.CFArrayCreate(s_cfAlpnHttp211Protocol, (UIntPtr)2);
internal enum PAL_TlsHandshakeState
{
[DllImport(Interop.Libraries.Advapi32, EntryPoint = "GetNamedSecurityInfoW", CallingConvention = CallingConvention.Winapi,
SetLastError = true, ExactSpelling = true, CharSet = CharSet.Unicode)]
internal static extern /*DWORD*/ uint GetSecurityInfoByName(string name, /*DWORD*/ uint objectType, /*DWORD*/ uint securityInformation,
- out IntPtr sidOwner,out IntPtr sidGroup, out IntPtr dacl, out IntPtr sacl, out IntPtr securityDescriptor);
+ out IntPtr sidOwner, out IntPtr sidGroup, out IntPtr dacl, out IntPtr sacl, out IntPtr securityDescriptor);
}
}
// ASCII char ToLower table
internal static readonly CaseInsensitiveAscii StaticInstance = new CaseInsensitiveAscii();
internal static ReadOnlySpan<byte> AsciiToLower => new byte[] {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 97, 98, 99,100,101,
- 102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,
- 122, 91, 92, 93, 94, 95, 96, 97, 98, 99,
- 100,101,102,103,104,105,106,107,108,109,
- 110,111,112,113,114,115,116,117,118,119,
- 120,121,122,123,124,125,126,127,128,129,
- 130,131,132,133,134,135,136,137,138,139,
- 140,141,142,143,144,145,146,147,148,149,
- 150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,
- 170,171,172,173,174,175,176,177,178,179,
- 180,181,182,183,184,185,186,187,188,189,
- 190,191,192,193,194,195,196,197,198,199,
- 200,201,202,203,204,205,206,207,208,209,
- 210,211,212,213,214,215,216,217,218,219,
- 220,221,222,223,224,225,226,227,228,229,
- 230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,
- 250,251,252,253,254,255
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 64, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255
};
// ASCII string case insensitive hash function
lock (ReceiveAsyncLock) // synchronize with receives in CloseAsync
{
ThrowIfOperationInProgress(_lastReceiveAsync.IsCompleted);
- Task<WebSocketReceiveResult> t = ReceiveAsyncPrivate<WebSocketReceiveResultGetter,WebSocketReceiveResult>(buffer, cancellationToken).AsTask();
+ Task<WebSocketReceiveResult> t = ReceiveAsyncPrivate<WebSocketReceiveResultGetter, WebSocketReceiveResult>(buffer, cancellationToken).AsTask();
_lastReceiveAsync = t;
return t;
}
{
private byte[] _buffer;
private int _offset;
- private Stack<(Asn1Tag,int,UniversalTagNumber)> _nestingStack;
+ private Stack<(Asn1Tag, int, UniversalTagNumber)> _nestingStack;
/// <summary>
/// The <see cref="AsnEncodingRules"/> in use by this writer.
if (_nestingStack == null)
{
- _nestingStack = new Stack<(Asn1Tag,int,UniversalTagNumber)>();
+ _nestingStack = new Stack<(Asn1Tag, int, UniversalTagNumber)>();
}
Debug.Assert(tag.IsConstructed);
}
private static readonly OperatorInfo[] s_operatorInfos = {
- new OperatorInfo(TokenKind.Unknown , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Equal , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.PlusEqual , PredefinedName.PN_COUNT , ExpressionKind.MultiOffset + (int)ExpressionKind.Add ),
- new OperatorInfo(TokenKind.MinusEqual , PredefinedName.PN_COUNT , ExpressionKind.MultiOffset + (int)ExpressionKind.Subtract ),
- new OperatorInfo(TokenKind.SplatEqual , PredefinedName.PN_COUNT , ExpressionKind.MultiOffset + (int)ExpressionKind.Multiply ),
- new OperatorInfo(TokenKind.SlashEqual , PredefinedName.PN_COUNT , ExpressionKind.MultiOffset + (int)ExpressionKind.Divide ),
- new OperatorInfo(TokenKind.PercentEqual , PredefinedName.PN_COUNT , ExpressionKind.MultiOffset + (int)ExpressionKind.Modulo ),
- new OperatorInfo(TokenKind.AndEqual , PredefinedName.PN_COUNT , ExpressionKind.MultiOffset + (int)ExpressionKind.BitwiseAnd ),
- new OperatorInfo(TokenKind.HatEqual , PredefinedName.PN_COUNT , ExpressionKind.MultiOffset + (int)ExpressionKind.BitwiseExclusiveOr),
- new OperatorInfo(TokenKind.BarEqual , PredefinedName.PN_COUNT , ExpressionKind.MultiOffset + (int)ExpressionKind.BitwiseOr ),
- new OperatorInfo(TokenKind.LeftShiftEqual , PredefinedName.PN_COUNT , ExpressionKind.MultiOffset + (int)ExpressionKind.LeftShirt ),
- new OperatorInfo(TokenKind.RightShiftEqual , PredefinedName.PN_COUNT , ExpressionKind.MultiOffset + (int)ExpressionKind.RightShift ),
- new OperatorInfo(TokenKind.Question , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.QuestionQuestion, PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.LogicalOr , PredefinedName.PN_COUNT , ExpressionKind.LogicalOr ),
- new OperatorInfo(TokenKind.LogicalAnd , PredefinedName.PN_COUNT , ExpressionKind.LogicalAnd ),
- new OperatorInfo(TokenKind.Bar , PredefinedName.PN_OPBITWISEOR , ExpressionKind.BitwiseOr ),
- new OperatorInfo(TokenKind.Hat , PredefinedName.PN_OPXOR , ExpressionKind.BitwiseExclusiveOr ),
- new OperatorInfo(TokenKind.Ampersand , PredefinedName.PN_OPBITWISEAND , ExpressionKind.BitwiseAnd ),
- new OperatorInfo(TokenKind.EqualEqual , PredefinedName.PN_OPEQUALITY , ExpressionKind.Eq ),
- new OperatorInfo(TokenKind.NotEqual , PredefinedName.PN_OPINEQUALITY , ExpressionKind.NotEq ),
- new OperatorInfo(TokenKind.LessThan , PredefinedName.PN_OPLESSTHAN , ExpressionKind.LessThan ),
- new OperatorInfo(TokenKind.LessThanEqual , PredefinedName.PN_OPLESSTHANOREQUAL , ExpressionKind.LessThanOrEqual ),
- new OperatorInfo(TokenKind.GreaterThan , PredefinedName.PN_OPGREATERTHAN , ExpressionKind.GreaterThan ),
+ new OperatorInfo(TokenKind.Unknown, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Equal, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.PlusEqual, PredefinedName.PN_COUNT, ExpressionKind.MultiOffset + (int)ExpressionKind.Add ),
+ new OperatorInfo(TokenKind.MinusEqual, PredefinedName.PN_COUNT, ExpressionKind.MultiOffset + (int)ExpressionKind.Subtract ),
+ new OperatorInfo(TokenKind.SplatEqual, PredefinedName.PN_COUNT, ExpressionKind.MultiOffset + (int)ExpressionKind.Multiply ),
+ new OperatorInfo(TokenKind.SlashEqual, PredefinedName.PN_COUNT, ExpressionKind.MultiOffset + (int)ExpressionKind.Divide ),
+ new OperatorInfo(TokenKind.PercentEqual, PredefinedName.PN_COUNT, ExpressionKind.MultiOffset + (int)ExpressionKind.Modulo ),
+ new OperatorInfo(TokenKind.AndEqual, PredefinedName.PN_COUNT, ExpressionKind.MultiOffset + (int)ExpressionKind.BitwiseAnd ),
+ new OperatorInfo(TokenKind.HatEqual, PredefinedName.PN_COUNT, ExpressionKind.MultiOffset + (int)ExpressionKind.BitwiseExclusiveOr),
+ new OperatorInfo(TokenKind.BarEqual, PredefinedName.PN_COUNT, ExpressionKind.MultiOffset + (int)ExpressionKind.BitwiseOr ),
+ new OperatorInfo(TokenKind.LeftShiftEqual, PredefinedName.PN_COUNT, ExpressionKind.MultiOffset + (int)ExpressionKind.LeftShirt ),
+ new OperatorInfo(TokenKind.RightShiftEqual, PredefinedName.PN_COUNT, ExpressionKind.MultiOffset + (int)ExpressionKind.RightShift ),
+ new OperatorInfo(TokenKind.Question, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.QuestionQuestion, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.LogicalOr, PredefinedName.PN_COUNT, ExpressionKind.LogicalOr ),
+ new OperatorInfo(TokenKind.LogicalAnd, PredefinedName.PN_COUNT, ExpressionKind.LogicalAnd ),
+ new OperatorInfo(TokenKind.Bar, PredefinedName.PN_OPBITWISEOR, ExpressionKind.BitwiseOr ),
+ new OperatorInfo(TokenKind.Hat, PredefinedName.PN_OPXOR, ExpressionKind.BitwiseExclusiveOr ),
+ new OperatorInfo(TokenKind.Ampersand, PredefinedName.PN_OPBITWISEAND, ExpressionKind.BitwiseAnd ),
+ new OperatorInfo(TokenKind.EqualEqual, PredefinedName.PN_OPEQUALITY, ExpressionKind.Eq ),
+ new OperatorInfo(TokenKind.NotEqual, PredefinedName.PN_OPINEQUALITY, ExpressionKind.NotEq ),
+ new OperatorInfo(TokenKind.LessThan, PredefinedName.PN_OPLESSTHAN, ExpressionKind.LessThan ),
+ new OperatorInfo(TokenKind.LessThanEqual, PredefinedName.PN_OPLESSTHANOREQUAL, ExpressionKind.LessThanOrEqual ),
+ new OperatorInfo(TokenKind.GreaterThan, PredefinedName.PN_OPGREATERTHAN, ExpressionKind.GreaterThan ),
new OperatorInfo(TokenKind.GreaterThanEqual, PredefinedName.PN_OPGREATERTHANOREQUAL, ExpressionKind.GreaterThanOrEqual ),
- new OperatorInfo(TokenKind.Is , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.As , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.LeftShift , PredefinedName.PN_OPLEFTSHIFT , ExpressionKind.LeftShirt ),
- new OperatorInfo(TokenKind.RightShift , PredefinedName.PN_OPRIGHTSHIFT , ExpressionKind.RightShift ),
- new OperatorInfo(TokenKind.Plus , PredefinedName.PN_OPPLUS , ExpressionKind.Add ),
- new OperatorInfo(TokenKind.Minus , PredefinedName.PN_OPMINUS , ExpressionKind.Subtract ),
- new OperatorInfo(TokenKind.Splat , PredefinedName.PN_OPMULTIPLY , ExpressionKind.Multiply ),
- new OperatorInfo(TokenKind.Slash , PredefinedName.PN_OPDIVISION , ExpressionKind.Divide ),
- new OperatorInfo(TokenKind.Percent , PredefinedName.PN_OPMODULUS , ExpressionKind.Modulo ),
- new OperatorInfo(TokenKind.Unknown , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Plus , PredefinedName.PN_OPUNARYPLUS , ExpressionKind.UnaryPlus ),
- new OperatorInfo(TokenKind.Minus , PredefinedName.PN_OPUNARYMINUS , ExpressionKind.Negate ),
- new OperatorInfo(TokenKind.Tilde , PredefinedName.PN_OPCOMPLEMENT , ExpressionKind.BitwiseNot ),
- new OperatorInfo(TokenKind.Bang , PredefinedName.PN_OPNEGATION , ExpressionKind.LogicalNot ),
- new OperatorInfo(TokenKind.PlusPlus , PredefinedName.PN_OPINCREMENT , ExpressionKind.Add ),
- new OperatorInfo(TokenKind.MinusMinus , PredefinedName.PN_OPDECREMENT , ExpressionKind.Subtract ),
- new OperatorInfo(TokenKind.TypeOf , PredefinedName.PN_COUNT , ExpressionKind.TypeOf ),
- new OperatorInfo(TokenKind.Checked , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Unchecked , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.MakeRef , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.RefValue , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.RefType , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.ArgList , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Unknown , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Splat , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Ampersand , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Colon , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.This , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Base , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Null , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.True , PredefinedName.PN_OPTRUE , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.False , PredefinedName.PN_OPFALSE , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Unknown , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Unknown , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Unknown , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.PlusPlus , PredefinedName.PN_COUNT , ExpressionKind.Add ),
- new OperatorInfo(TokenKind.MinusMinus , PredefinedName.PN_COUNT , ExpressionKind.Subtract ),
- new OperatorInfo(TokenKind.Dot , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Implicit , PredefinedName.PN_OPIMPLICITMN , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Explicit , PredefinedName.PN_OPEXPLICITMN , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Unknown , PredefinedName.PN_OPEQUALS , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Unknown , PredefinedName.PN_OPCOMPARE , ExpressionKind.ExpressionKindCount ),
- new OperatorInfo(TokenKind.Unknown , PredefinedName.PN_COUNT , ExpressionKind.ExpressionKindCount )
+ new OperatorInfo(TokenKind.Is, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.As, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.LeftShift, PredefinedName.PN_OPLEFTSHIFT, ExpressionKind.LeftShirt ),
+ new OperatorInfo(TokenKind.RightShift, PredefinedName.PN_OPRIGHTSHIFT, ExpressionKind.RightShift ),
+ new OperatorInfo(TokenKind.Plus, PredefinedName.PN_OPPLUS, ExpressionKind.Add ),
+ new OperatorInfo(TokenKind.Minus, PredefinedName.PN_OPMINUS, ExpressionKind.Subtract ),
+ new OperatorInfo(TokenKind.Splat, PredefinedName.PN_OPMULTIPLY, ExpressionKind.Multiply ),
+ new OperatorInfo(TokenKind.Slash, PredefinedName.PN_OPDIVISION, ExpressionKind.Divide ),
+ new OperatorInfo(TokenKind.Percent, PredefinedName.PN_OPMODULUS, ExpressionKind.Modulo ),
+ new OperatorInfo(TokenKind.Unknown, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Plus, PredefinedName.PN_OPUNARYPLUS, ExpressionKind.UnaryPlus ),
+ new OperatorInfo(TokenKind.Minus, PredefinedName.PN_OPUNARYMINUS, ExpressionKind.Negate ),
+ new OperatorInfo(TokenKind.Tilde, PredefinedName.PN_OPCOMPLEMENT, ExpressionKind.BitwiseNot ),
+ new OperatorInfo(TokenKind.Bang, PredefinedName.PN_OPNEGATION, ExpressionKind.LogicalNot ),
+ new OperatorInfo(TokenKind.PlusPlus, PredefinedName.PN_OPINCREMENT, ExpressionKind.Add ),
+ new OperatorInfo(TokenKind.MinusMinus, PredefinedName.PN_OPDECREMENT, ExpressionKind.Subtract ),
+ new OperatorInfo(TokenKind.TypeOf, PredefinedName.PN_COUNT, ExpressionKind.TypeOf ),
+ new OperatorInfo(TokenKind.Checked, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Unchecked, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.MakeRef, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.RefValue, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.RefType, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.ArgList, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Unknown, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Splat, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Ampersand, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Colon, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.This, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Base, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Null, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.True, PredefinedName.PN_OPTRUE, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.False, PredefinedName.PN_OPFALSE, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Unknown, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Unknown, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Unknown, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.PlusPlus, PredefinedName.PN_COUNT, ExpressionKind.Add ),
+ new OperatorInfo(TokenKind.MinusMinus, PredefinedName.PN_COUNT, ExpressionKind.Subtract ),
+ new OperatorInfo(TokenKind.Dot, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Implicit, PredefinedName.PN_OPIMPLICITMN, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Explicit, PredefinedName.PN_OPEXPLICITMN, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Unknown, PredefinedName.PN_OPEQUALS, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Unknown, PredefinedName.PN_OPCOMPARE, ExpressionKind.ExpressionKindCount ),
+ new OperatorInfo(TokenKind.Unknown, PredefinedName.PN_COUNT, ExpressionKind.ExpressionKindCount )
};
private static Dictionary<Name, string> s_operatorsByName;
private static readonly byte[][] s_simpleTypeConversions =
{
- // to: BYTE I2 I4 I8 FLT DBL DEC CHAR BOOL SBYTE U2 U4 U8
+ // to: BYTE I2 I4 I8 FLT DBL DEC CHAR BOOL SBYTE U2 U4 U8
/* from */
- new byte[] /* BYTE */ { ID , IMP , IMP , IMP , IMP , IMP , IUD, EXP , NO , EXP , IMP , IMP , IMP },
- new byte[] /* I2 */ { EXP , ID , IMP , IMP , IMP , IMP , IUD, EXP , NO , EXP , EXP , EXP , EXP },
- new byte[] /* I4 */ { EXP , EXP , ID , IMP , IMP , IMP , IUD, EXP , NO , EXP , EXP , EXP , EXP },
- new byte[] /* I8 */ { EXP , EXP , EXP , ID , IMP , IMP , IUD, EXP , NO , EXP , EXP , EXP , EXP },
- new byte[] /* FLT */ { EXP , EXP , EXP , EXP , ID , IMP , XUD, EXP , NO , EXP , EXP , EXP , EXP },
- new byte[] /* DBL */ { EXP , EXP , EXP , EXP , EXP , ID , XUD, EXP , NO , EXP , EXP , EXP , EXP },
- new byte[] /* DEC */ { XUD , XUD , XUD , XUD , XUD , XUD , ID , XUD , NO , XUD , XUD , XUD , XUD },
- new byte[] /* CHAR */ { EXP , EXP , IMP , IMP , IMP , IMP , IUD, ID , NO , EXP , IMP , IMP , IMP },
- new byte[] /* BOOL */ { NO , NO , NO , NO , NO , NO , NO , NO , ID , NO , NO , NO , NO },
- new byte[] /*SBYTE */ { EXP , IMP , IMP , IMP , IMP , IMP , IUD, EXP , NO , ID , EXP , EXP , EXP },
- new byte[] /* U2 */ { EXP , EXP , IMP , IMP , IMP , IMP , IUD, EXP , NO , EXP , ID , IMP , IMP },
- new byte[] /* U4 */ { EXP , EXP , EXP , IMP , IMP , IMP , IUD, EXP , NO , EXP , EXP , ID , IMP },
- new byte[] /* U8 */ { EXP , EXP , EXP , EXP , IMP , IMP , IUD, EXP , NO , EXP , EXP , EXP , ID },
+ new byte[] /* BYTE */ { ID, IMP, IMP, IMP, IMP, IMP, IUD, EXP, NO, EXP, IMP, IMP, IMP },
+ new byte[] /* I2 */ { EXP, ID, IMP, IMP, IMP, IMP, IUD, EXP, NO, EXP, EXP, EXP, EXP },
+ new byte[] /* I4 */ { EXP, EXP, ID, IMP, IMP, IMP, IUD, EXP, NO, EXP, EXP, EXP, EXP },
+ new byte[] /* I8 */ { EXP, EXP, EXP, ID, IMP, IMP, IUD, EXP, NO, EXP, EXP, EXP, EXP },
+ new byte[] /* FLT */ { EXP, EXP, EXP, EXP, ID, IMP, XUD, EXP, NO, EXP, EXP, EXP, EXP },
+ new byte[] /* DBL */ { EXP, EXP, EXP, EXP, EXP, ID, XUD, EXP, NO, EXP, EXP, EXP, EXP },
+ new byte[] /* DEC */ { XUD, XUD, XUD, XUD, XUD, XUD, ID, XUD, NO, XUD, XUD, XUD, XUD },
+ new byte[] /* CHAR */ { EXP, EXP, IMP, IMP, IMP, IMP, IUD, ID, NO, EXP, IMP, IMP, IMP },
+ new byte[] /* BOOL */ { NO, NO, NO, NO, NO, NO, NO, NO, ID, NO, NO, NO, NO },
+ new byte[] /*SBYTE */ { EXP, IMP, IMP, IMP, IMP, IMP, IUD, EXP, NO, ID, EXP, EXP, EXP },
+ new byte[] /* U2 */ { EXP, EXP, IMP, IMP, IMP, IMP, IUD, EXP, NO, EXP, ID, IMP, IMP },
+ new byte[] /* U4 */ { EXP, EXP, EXP, IMP, IMP, IMP, IUD, EXP, NO, EXP, EXP, ID, IMP },
+ new byte[] /* U8 */ { EXP, EXP, EXP, EXP, IMP, IMP, IUD, EXP, NO, EXP, EXP, EXP, ID },
};
private const int NUM_SIMPLE_TYPES = (int)PredefinedType.PT_ULONG + 1;
private static readonly byte[][] s_simpleTypeBetter =
{
- // BYTE SHORT INT LONG FLOAT DOUBLE DECIMAL CHAR BOOL SBYTE USHORT UINT ULONG IPTR UIPTR OBJECT
- new byte[] /* BYTE */{same ,left ,left ,left ,left ,left ,left ,neither,neither,right ,left ,left ,left ,neither,neither,left },
- new byte[] /* SHORT */{right ,same ,left ,left ,left ,left ,left ,neither,neither,right ,left ,left ,left ,neither,neither,left },
- new byte[] /* INT */{right ,right ,same ,left ,left ,left ,left ,right ,neither,right ,right ,left ,left ,neither,neither,left },
- new byte[] /* LONG */{right ,right ,right ,same ,left ,left ,left ,right ,neither,right ,right ,right ,left ,neither,neither,left },
- new byte[] /* FLOAT */{right ,right ,right ,right ,same ,left ,neither,right ,neither,right ,right ,right ,right ,neither,neither,left },
- new byte[] /* DOUBLE */{right ,right ,right ,right ,right ,same ,neither,right ,neither,right ,right ,right ,right ,neither,neither,left },
- new byte[] /* DECIMAL*/{right ,right ,right ,right ,neither,neither,same ,right ,neither,right ,right ,right ,right ,neither,neither,left },
- new byte[] /* CHAR */{neither,neither,left ,left ,left ,left ,left ,same ,neither,neither,left ,left ,left ,neither,neither,left },
- new byte[] /* BOOL */{neither,neither,neither,neither,neither,neither,neither,neither,same ,neither,neither,neither,neither,neither,neither,left },
- new byte[] /* SBYTE */{left ,left ,left ,left ,left ,left ,left ,neither,neither,same ,left ,left ,left ,neither,neither,left },
- new byte[] /* USHORT */{right ,right ,left ,left ,left ,left ,left ,right ,neither,right ,same ,left ,left ,neither,neither,left },
- new byte[] /* UINT */{right ,right ,right ,left ,left ,left ,left ,right ,neither,right ,right ,same ,left ,neither,neither,left },
- new byte[] /* ULONG */{right ,right ,right ,right ,left ,left ,left ,right ,neither,right ,right ,right ,same ,neither,neither,left },
- new byte[] /* IPTR */{neither,neither,neither,neither,neither,neither,neither,neither,neither,neither,neither,neither,neither,same ,neither,left },
- new byte[] /* UIPTR */{neither,neither,neither,neither,neither,neither,neither,neither,neither,neither,neither,neither,neither,neither,same ,left },
- new byte[] /* OBJECT */{right ,right ,right ,right ,right ,right ,right ,right ,right ,right ,right ,right ,right ,right ,right ,same }
+ // BYTE SHORT INT LONG FLOAT DOUBLE DECIMAL CHAR BOOL SBYTE USHORT UINT ULONG IPTR UIPTR OBJECT
+ new byte[] /* BYTE */ { same, left, left, left, left, left, left, neither, neither, right, left, left, left, neither, neither, left },
+ new byte[] /* SHORT */ { right, same, left, left, left, left, left, neither, neither, right, left, left, left, neither, neither, left },
+ new byte[] /* INT */ { right, right, same, left, left, left, left, right, neither, right, right, left, left, neither, neither, left },
+ new byte[] /* LONG */ { right, right, right, same, left, left, left, right, neither, right, right, right, left, neither, neither, left },
+ new byte[] /* FLOAT */ { right, right, right, right, same, left, neither, right, neither, right, right, right, right, neither, neither, left },
+ new byte[] /* DOUBLE */ { right, right, right, right, right, same, neither, right, neither, right, right, right, right, neither, neither, left },
+ new byte[] /* DECIMAL*/ { right, right, right, right, neither, neither, same, right, neither, right, right, right, right, neither, neither, left },
+ new byte[] /* CHAR */ { neither, neither, left, left, left, left, left, same, neither, neither, left, left, left, neither, neither, left },
+ new byte[] /* BOOL */ { neither, neither, neither, neither, neither, neither, neither, neither, same, neither, neither, neither, neither, neither, neither, left },
+ new byte[] /* SBYTE */ { left, left, left, left, left, left, left, neither, neither, same, left, left, left, neither, neither, left },
+ new byte[] /* USHORT */ { right, right, left, left, left, left, left, right, neither, right, same, left, left, neither, neither, left },
+ new byte[] /* UINT */ { right, right, right, left, left, left, left, right, neither, right, right, same, left, neither, neither, left },
+ new byte[] /* ULONG */ { right, right, right, right, left, left, left, right, neither, right, right, right, same, neither, neither, left },
+ new byte[] /* IPTR */ { neither, neither, neither, neither, neither, neither, neither, neither, neither, neither, neither, neither, neither, same, neither, left },
+ new byte[] /* UIPTR */ { neither, neither, neither, neither, neither, neither, neither, neither, neither, neither, neither, neither, neither, neither, same, left },
+ new byte[] /* OBJECT */ { right, right, right, right, right, right, right, right, right, right, right, right, right, right, right, same }
};
#if DEBUG
private static volatile bool s_fCheckedBetter = false;
EXF_SAMENAMETYPE = 0x800000,
EXF_MASK_ANY = EXF_UNREACHABLEBEGIN | EXF_UNREACHABLEEND |
- EXF_USEORIGDEBUGINFO | EXF_LASTBRACEDEBUGINFO | EXF_NODEBUGINFO |
- EXF_IMPLICITTHIS | EXF_CANTBENULL | EXF_CHECKOVERFLOW |
- EXF_PUSH_OP_FIRST | EXF_ASSGOP | EXF_LVALUE | EXF_SAMENAMETYPE
-,
+ EXF_USEORIGDEBUGINFO | EXF_LASTBRACEDEBUGINFO | EXF_NODEBUGINFO |
+ EXF_IMPLICITTHIS | EXF_CANTBENULL | EXF_CHECKOVERFLOW |
+ EXF_PUSH_OP_FIRST | EXF_ASSGOP | EXF_LVALUE | EXF_SAMENAMETYPE,
// Used to mask the cast flags off an EXPRCAST.
EXF_CAST_ALL = EXF_BOX | EXF_UNBOX | EXF_REFCHECK | EXF_INDEXEXPR | EXF_FORCE_BOX | EXF_FORCE_UNBOX | EXF_STATIC_CAST
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_SUBTRACT_USER_DEFINED, PredefinedType.PT_EXPRESSION, PredefinedName.PN_SUBTRACT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)PredefinedType.PT_BINARYEXPRESSION, 3, (int)PredefinedType.PT_EXPRESSION, (int)PredefinedType.PT_EXPRESSION, (int)PredefinedType.PT_METHODINFO }),
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_SUBTRACTCHECKED, PredefinedType.PT_EXPRESSION, PredefinedName.PN_SUBTRACTCHECKED, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)PredefinedType.PT_BINARYEXPRESSION, 2, (int)PredefinedType.PT_EXPRESSION, (int)PredefinedType.PT_EXPRESSION }),
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_SUBTRACTCHECKED_USER_DEFINED, PredefinedType.PT_EXPRESSION, PredefinedName.PN_SUBTRACTCHECKED, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)PredefinedType.PT_BINARYEXPRESSION, 3, (int)PredefinedType.PT_EXPRESSION, (int)PredefinedType.PT_EXPRESSION, (int)PredefinedType.PT_METHODINFO }),
- new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_UNARYPLUS_USER_DEFINED, PredefinedType.PT_EXPRESSION, PredefinedName.PN_PLUS , MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)PredefinedType.PT_UNARYEXPRESSION, 2, (int)PredefinedType.PT_EXPRESSION, (int)PredefinedType.PT_METHODINFO }),
+ new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_UNARYPLUS_USER_DEFINED, PredefinedType.PT_EXPRESSION, PredefinedName.PN_PLUS, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)PredefinedType.PT_UNARYEXPRESSION, 2, (int)PredefinedType.PT_EXPRESSION, (int)PredefinedType.PT_METHODINFO }),
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NEGATE, PredefinedType.PT_EXPRESSION, PredefinedName.PN_NEGATE, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)PredefinedType.PT_UNARYEXPRESSION, 1, (int)PredefinedType.PT_EXPRESSION }),
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NEGATE_USER_DEFINED, PredefinedType.PT_EXPRESSION, PredefinedName.PN_NEGATE, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)PredefinedType.PT_UNARYEXPRESSION, 2, (int)PredefinedType.PT_EXPRESSION, (int)PredefinedType.PT_METHODINFO }),
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NEGATECHECKED, PredefinedType.PT_EXPRESSION, PredefinedName.PN_NEGATECHECKED, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)PredefinedType.PT_UNARYEXPRESSION, 1, (int)PredefinedType.PT_EXPRESSION }),
/// Enables the AssemblyCatalog to discover user provided ReflectionContexts.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")]
- [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false,Inherited = true)]
+ [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = true)]
public class CatalogReflectionContextAttribute : Attribute
{
private readonly Type _reflectionContextType;
namespace System.ComponentModel.Composition.Hosting
{
- public class AggregateExportProvider : ExportProvider , IDisposable
+ public class AggregateExportProvider : ExportProvider, IDisposable
{
private readonly ReadOnlyCollection<ExportProvider> _readOnlyProviders;
private readonly ExportProvider[] _providers;
{
if (_values[index].Key == key)
{
- _values[index] = new KeyValuePair<object,object>(key, value);
+ _values[index] = new KeyValuePair<object, object>(key, value);
return;
}
}
Lazy<ParameterInfo> importingLazyParameter,
string contractName,
string requiredTypeIdentity,
- IEnumerable<KeyValuePair<string,Type>> requiredMetadata,
+ IEnumerable<KeyValuePair<string, Type>> requiredMetadata,
ImportCardinality cardinality,
CreationPolicy requiredCreationPolicy,
IDictionary<string, object> metadata,
if (!objectType.IsInstanceOfType(instance))
{
- throw new ArgumentException(SR.Format(SR.ConvertToException, nameof(objectType), instance.GetType()) , nameof(instance));
+ throw new ArgumentException(SR.Format(SR.ConvertToException, nameof(objectType), instance.GetType()), nameof(instance));
}
return new ComNativeTypeDescriptor(Handler, instance);
else
{
XmlDataTreeWriter xmldataWriter = new XmlDataTreeWriter(this, writeHierarchy);
- xmldataWriter.Save(writer,/*mode == XmlWriteMode.WriteSchema*/ false);
+ xmldataWriter.Save(writer, /*mode == XmlWriteMode.WriteSchema*/ false);
}
}
}
}
/// <summary>This method exists for LinqDataView to keep a level of abstraction away from the RBTree</summary>
- internal Range FindRecords<TKey,TRow>(Index.ComparisonBySelector<TKey,TRow> comparison, TKey key) where TRow:DataRow
+ internal Range FindRecords<TKey, TRow>(Index.ComparisonBySelector<TKey, TRow> comparison, TKey key) where TRow:DataRow
{
return _index.FindRecords(comparison, key);
}
// The array in Shiloh. Listed here for comparison.
//private static readonly byte[] rgCLenFromPrec = new byte[] {5,5,5,5,5,5,5,5,5,9,9,9,9,9,
// 9,9,9,9,9,13,13,13,13,13,13,13,13,13,17,17,17,17,17,17,17,17,17,17};
- private static readonly byte[] s_rgCLenFromPrec = new byte[] {1,1,1,1,1,1,1,1,1,2,2,2,2,2,
- 2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4};
+ private static readonly byte[] s_rgCLenFromPrec = new byte[]
+ {
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4
+ };
private static byte CLenFromPrec(byte bPrec)
{
return x;
}
- internal delegate int ComparisonBySelector<TKey,TRow>(TKey key, TRow row) where TRow:DataRow;
+ internal delegate int ComparisonBySelector<TKey, TRow>(TKey key, TRow row) where TRow:DataRow;
/// <summary>This method exists for LinqDataView to keep a level of abstraction away from the RBTree</summary>
- internal Range FindRecords<TKey,TRow>(ComparisonBySelector<TKey,TRow> comparison, TKey key) where TRow:DataRow
+ internal Range FindRecords<TKey, TRow>(ComparisonBySelector<TKey, TRow> comparison, TKey key) where TRow:DataRow
{
int x = _records.root;
while (IndexTree.NIL != x)
// XDR spec: http://www.ltg.ed.ac.uk/~ht/XMLData-Reduced.htm
private static readonly NameType[] s_mapNameTypeXdr = {
- new NameType("bin.base64" , typeof(byte[]) ), /* XDR */
- new NameType("bin.hex" , typeof(byte[]) ), /* XDR */
- new NameType("boolean" , typeof(bool) ), /* XDR */
- new NameType("byte" , typeof(sbyte) ), /* XDR */
- new NameType("char" , typeof(char) ), /* XDR */
- new NameType("date" , typeof(DateTime)), /* XDR */
- new NameType("dateTime" , typeof(DateTime)), /* XDR */
- new NameType("dateTime.tz" , typeof(DateTime)), /* XDR */
- new NameType("entities" , typeof(string) ), /* XDR */
- new NameType("entity" , typeof(string) ), /* XDR */
- new NameType("enumeration" , typeof(string) ), /* XDR */
- new NameType("fixed.14.4" , typeof(decimal) ), /* XDR */
- new NameType("float" , typeof(double) ), /* XDR */
- new NameType("i1" , typeof(sbyte) ), /* XDR */
- new NameType("i2" , typeof(short) ), /* XDR */
- new NameType("i4" , typeof(int) ), /* XDR */
- new NameType("i8" , typeof(long) ), /* XDR */
- new NameType("id" , typeof(string) ), /* XDR */
- new NameType("idref" , typeof(string) ), /* XDR */
- new NameType("idrefs" , typeof(string) ), /* XDR */
- new NameType("int" , typeof(int) ), /* XDR */
- new NameType("nmtoken" , typeof(string) ), /* XDR */
- new NameType("nmtokens" , typeof(string) ), /* XDR */
- new NameType("notation" , typeof(string) ), /* XDR */
- new NameType("number" , typeof(decimal) ), /* XDR */
- new NameType("r4" , typeof(float) ), /* XDR */
- new NameType("r8" , typeof(double) ), /* XDR */
- new NameType("string" , typeof(string) ), /* XDR */
- new NameType("time" , typeof(DateTime)), /* XDR */
- new NameType("time.tz" , typeof(DateTime)), /* XDR */
- new NameType("ui1" , typeof(byte) ), /* XDR */
- new NameType("ui2" , typeof(ushort) ), /* XDR */
- new NameType("ui4" , typeof(uint) ), /* XDR */
- new NameType("ui8" , typeof(ulong) ), /* XDR */
- new NameType("uri" , typeof(string) ), /* XDR */
- new NameType("uuid" , typeof(Guid) ), /* XDR */
+ new NameType("bin.base64", typeof(byte[]) ),
+ new NameType("bin.hex", typeof(byte[]) ),
+ new NameType("boolean", typeof(bool) ),
+ new NameType("byte", typeof(sbyte) ),
+ new NameType("char", typeof(char) ),
+ new NameType("date", typeof(DateTime)),
+ new NameType("dateTime", typeof(DateTime)),
+ new NameType("dateTime.tz", typeof(DateTime)),
+ new NameType("entities", typeof(string) ),
+ new NameType("entity", typeof(string) ),
+ new NameType("enumeration", typeof(string) ),
+ new NameType("fixed.14.4", typeof(decimal) ),
+ new NameType("float", typeof(double) ),
+ new NameType("i1", typeof(sbyte) ),
+ new NameType("i2", typeof(short) ),
+ new NameType("i4", typeof(int) ),
+ new NameType("i8", typeof(long) ),
+ new NameType("id", typeof(string) ),
+ new NameType("idref", typeof(string) ),
+ new NameType("idrefs", typeof(string) ),
+ new NameType("int", typeof(int) ),
+ new NameType("nmtoken", typeof(string) ),
+ new NameType("nmtokens", typeof(string) ),
+ new NameType("notation", typeof(string) ),
+ new NameType("number", typeof(decimal) ),
+ new NameType("r4", typeof(float) ),
+ new NameType("r8", typeof(double) ),
+ new NameType("string", typeof(string) ),
+ new NameType("time", typeof(DateTime)),
+ new NameType("time.tz", typeof(DateTime)),
+ new NameType("ui1", typeof(byte) ),
+ new NameType("ui2", typeof(ushort) ),
+ new NameType("ui4", typeof(uint) ),
+ new NameType("ui8", typeof(ulong) ),
+ new NameType("uri", typeof(string) ),
+ new NameType("uuid", typeof(Guid) ),
};
private static NameType FindNameType(string name)
// April: http://www.w3.org/TR/2000/WD-xmlschema-2-20000407/datatypes.html
// Fabr: http://www.w3.org/TR/2000/WD-xmlschema-2-20000225/
private static readonly NameType[] s_mapNameTypeXsd = {
- new NameType("ENTITIES" , typeof(string) ), /* XSD Apr */
- new NameType("ENTITY" , typeof(string) ), /* XSD Apr */
- new NameType("ID" , typeof(string) ), /* XSD Apr */
- new NameType("IDREF" , typeof(string) ), /* XSD Apr */
- new NameType("IDREFS" , typeof(string) ), /* XSD Apr */
- new NameType("NCName" , typeof(string) ), /* XSD Apr */
- new NameType("NMTOKEN" , typeof(string) ), /* XSD Apr */
- new NameType("NMTOKENS" , typeof(string) ), /* XSD Apr */
- new NameType("NOTATION" , typeof(string) ), /* XSD Apr */
- new NameType("Name" , typeof(string) ), /* XSD Apr */
- new NameType("QName" , typeof(string) ), /* XSD Apr */
-
- new NameType("anyType" , typeof(object) ), /* XSD Apr */
- new NameType("anyURI" , typeof(System.Uri) ), /* XSD Apr */
- new NameType("base64Binary" , typeof(byte[]) ), /* XSD Apr : abstruct */
- new NameType("boolean" , typeof(bool) ), /* XSD Apr */
- new NameType("byte" , typeof(sbyte) ), /* XSD Apr */
- new NameType("date" , typeof(DateTime)), /* XSD Apr */
- new NameType("dateTime" , typeof(DateTime)), /* XSD Apr */
- new NameType("decimal" , typeof(decimal) ), /* XSD 2001 March */
- new NameType("double" , typeof(double) ), /* XSD Apr */
- new NameType("duration" , typeof(TimeSpan)), /* XSD Apr */
- new NameType("float" , typeof(float) ), /* XSD Apr */
- new NameType("gDay" , typeof(DateTime)), /* XSD Apr */
- new NameType("gMonth" , typeof(DateTime)), /* XSD Apr */
- new NameType("gMonthDay" , typeof(DateTime)), /* XSD Apr */
- new NameType("gYear" , typeof(DateTime)), /* XSD Apr */
- new NameType("gYearMonth" , typeof(DateTime)), /* XSD Apr */
- new NameType("hexBinary" , typeof(byte[]) ), /* XSD Apr : abstruct */
- new NameType("int" , typeof(int) ), /* XSD Apr */
- new NameType("integer" , typeof(long) ), /* XSD Apr */ // <xs:element name="" msdata:DataType="System.Numerics.BigInteger" type="xs:integer" minOccurs="0" />
- new NameType("language" , typeof(string) ), /* XSD Apr */
- new NameType("long" , typeof(long) ), /* XSD Apr */
- new NameType("negativeInteger" , typeof(long) ), /* XSD Apr */
- new NameType("nonNegativeInteger" , typeof(ulong) ), /* XSD Apr */
- new NameType("nonPositiveInteger" , typeof(long) ), /* XSD Apr */
- new NameType("normalizedString" , typeof(string) ), /* XSD Apr */
- new NameType("positiveInteger" , typeof(ulong) ), /* XSD Apr */
- new NameType("short" , typeof(short) ), /* XSD Apr */
- new NameType("string" , typeof(string) ), /* XSD Apr */
- new NameType("time" , typeof(DateTime)), /* XSD Apr */
- new NameType("unsignedByte" , typeof(byte) ), /* XSD Apr */
- new NameType("unsignedInt" , typeof(uint) ), /* XSD Apr */
- new NameType("unsignedLong" , typeof(ulong) ), /* XSD Apr */
- new NameType("unsignedShort" , typeof(ushort) ), /* XSD Apr */
+ new NameType("ENTITIES", typeof(string) ), /* XSD Apr */
+ new NameType("ENTITY", typeof(string) ), /* XSD Apr */
+ new NameType("ID", typeof(string) ), /* XSD Apr */
+ new NameType("IDREF", typeof(string) ), /* XSD Apr */
+ new NameType("IDREFS", typeof(string) ), /* XSD Apr */
+ new NameType("NCName", typeof(string) ), /* XSD Apr */
+ new NameType("NMTOKEN", typeof(string) ), /* XSD Apr */
+ new NameType("NMTOKENS", typeof(string) ), /* XSD Apr */
+ new NameType("NOTATION", typeof(string) ), /* XSD Apr */
+ new NameType("Name", typeof(string) ), /* XSD Apr */
+ new NameType("QName", typeof(string) ), /* XSD Apr */
+ new NameType("anyType", typeof(object) ), /* XSD Apr */
+ new NameType("anyURI", typeof(System.Uri) ), /* XSD Apr */
+ new NameType("base64Binary", typeof(byte[]) ), /* XSD Apr : abstruct */
+ new NameType("boolean", typeof(bool) ), /* XSD Apr */
+ new NameType("byte", typeof(sbyte) ), /* XSD Apr */
+ new NameType("date", typeof(DateTime) ), /* XSD Apr */
+ new NameType("dateTime", typeof(DateTime) ), /* XSD Apr */
+ new NameType("decimal", typeof(decimal) ), /* XSD 2001 March */
+ new NameType("double", typeof(double) ), /* XSD Apr */
+ new NameType("duration", typeof(TimeSpan) ), /* XSD Apr */
+ new NameType("float", typeof(float) ), /* XSD Apr */
+ new NameType("gDay", typeof(DateTime) ), /* XSD Apr */
+ new NameType("gMonth", typeof(DateTime) ), /* XSD Apr */
+ new NameType("gMonthDay", typeof(DateTime) ), /* XSD Apr */
+ new NameType("gYear", typeof(DateTime) ), /* XSD Apr */
+ new NameType("gYearMonth", typeof(DateTime) ), /* XSD Apr */
+ new NameType("hexBinary", typeof(byte[]) ), /* XSD Apr : abstruct */
+ new NameType("int", typeof(int) ), /* XSD Apr */
+ new NameType("integer", typeof(long) ), /* XSD Apr */ // <xs:element name="" msdata:DataType="System.Numerics.BigInteger" type="xs:integer" minOccurs="0" />
+ new NameType("language", typeof(string) ), /* XSD Apr */
+ new NameType("long", typeof(long) ), /* XSD Apr */
+ new NameType("negativeInteger", typeof(long) ), /* XSD Apr */
+ new NameType("nonNegativeInteger", typeof(ulong) ), /* XSD Apr */
+ new NameType("nonPositiveInteger", typeof(long) ), /* XSD Apr */
+ new NameType("normalizedString", typeof(string) ), /* XSD Apr */
+ new NameType("positiveInteger", typeof(ulong) ), /* XSD Apr */
+ new NameType("short", typeof(short) ), /* XSD Apr */
+ new NameType("string", typeof(string) ), /* XSD Apr */
+ new NameType("time", typeof(DateTime) ), /* XSD Apr */
+ new NameType("unsignedByte", typeof(byte) ), /* XSD Apr */
+ new NameType("unsignedInt", typeof(uint) ), /* XSD Apr */
+ new NameType("unsignedLong", typeof(ulong) ), /* XSD Apr */
+ new NameType("unsignedShort", typeof(ushort) ), /* XSD Apr */
};
private static NameType FindNameType(string name)
{
// set up the colletion name ODBC function mapping guid mapping
_schemaMapping = new SchemaFunctionName[] {
- new SchemaFunctionName(DbMetaDataCollectionNames.DataTypes,ODBC32.SQL_API.SQLGETTYPEINFO),
- new SchemaFunctionName(OdbcMetaDataCollectionNames.Columns,ODBC32.SQL_API.SQLCOLUMNS),
- new SchemaFunctionName(OdbcMetaDataCollectionNames.Indexes,ODBC32.SQL_API.SQLSTATISTICS),
- new SchemaFunctionName(OdbcMetaDataCollectionNames.Procedures,ODBC32.SQL_API.SQLPROCEDURES),
- new SchemaFunctionName(OdbcMetaDataCollectionNames.ProcedureColumns,ODBC32.SQL_API.SQLPROCEDURECOLUMNS),
- new SchemaFunctionName(OdbcMetaDataCollectionNames.ProcedureParameters,ODBC32.SQL_API.SQLPROCEDURECOLUMNS),
- new SchemaFunctionName(OdbcMetaDataCollectionNames.Tables,ODBC32.SQL_API.SQLTABLES),
- new SchemaFunctionName(OdbcMetaDataCollectionNames.Views,ODBC32.SQL_API.SQLTABLES)};
+ new SchemaFunctionName(DbMetaDataCollectionNames.DataTypes, ODBC32.SQL_API.SQLGETTYPEINFO),
+ new SchemaFunctionName(OdbcMetaDataCollectionNames.Columns, ODBC32.SQL_API.SQLCOLUMNS),
+ new SchemaFunctionName(OdbcMetaDataCollectionNames.Indexes, ODBC32.SQL_API.SQLSTATISTICS),
+ new SchemaFunctionName(OdbcMetaDataCollectionNames.Procedures, ODBC32.SQL_API.SQLPROCEDURES),
+ new SchemaFunctionName(OdbcMetaDataCollectionNames.ProcedureColumns, ODBC32.SQL_API.SQLPROCEDURECOLUMNS),
+ new SchemaFunctionName(OdbcMetaDataCollectionNames.ProcedureParameters, ODBC32.SQL_API.SQLPROCEDURECOLUMNS),
+ new SchemaFunctionName(OdbcMetaDataCollectionNames.Tables, ODBC32.SQL_API.SQLTABLES),
+ new SchemaFunctionName(OdbcMetaDataCollectionNames.Views, ODBC32.SQL_API.SQLTABLES)};
// verify the existance of the table in the data set
DataTable metaDataCollectionsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections];
{
// set up the colletion mane schema rowset guid mapping
_schemaMapping = new SchemaRowsetName[] {
- new SchemaRowsetName(DbMetaDataCollectionNames.DataTypes,OleDbSchemaGuid.Provider_Types),
- new SchemaRowsetName(OleDbMetaDataCollectionNames.Catalogs,OleDbSchemaGuid.Catalogs),
- new SchemaRowsetName(OleDbMetaDataCollectionNames.Collations,OleDbSchemaGuid.Collations),
- new SchemaRowsetName(OleDbMetaDataCollectionNames.Columns,OleDbSchemaGuid.Columns),
- new SchemaRowsetName(OleDbMetaDataCollectionNames.Indexes,OleDbSchemaGuid.Indexes),
- new SchemaRowsetName(OleDbMetaDataCollectionNames.Procedures,OleDbSchemaGuid.Procedures),
- new SchemaRowsetName(OleDbMetaDataCollectionNames.ProcedureColumns,OleDbSchemaGuid.Procedure_Columns),
- new SchemaRowsetName(OleDbMetaDataCollectionNames.ProcedureParameters,OleDbSchemaGuid.Procedure_Parameters),
- new SchemaRowsetName(OleDbMetaDataCollectionNames.Tables,OleDbSchemaGuid.Tables),
- new SchemaRowsetName(OleDbMetaDataCollectionNames.Views,OleDbSchemaGuid.Views)};
+ new SchemaRowsetName(DbMetaDataCollectionNames.DataTypes, OleDbSchemaGuid.Provider_Types),
+ new SchemaRowsetName(OleDbMetaDataCollectionNames.Catalogs, OleDbSchemaGuid.Catalogs),
+ new SchemaRowsetName(OleDbMetaDataCollectionNames.Collations, OleDbSchemaGuid.Collations),
+ new SchemaRowsetName(OleDbMetaDataCollectionNames.Columns, OleDbSchemaGuid.Columns),
+ new SchemaRowsetName(OleDbMetaDataCollectionNames.Indexes, OleDbSchemaGuid.Indexes),
+ new SchemaRowsetName(OleDbMetaDataCollectionNames.Procedures, OleDbSchemaGuid.Procedures),
+ new SchemaRowsetName(OleDbMetaDataCollectionNames.ProcedureColumns, OleDbSchemaGuid.Procedure_Columns),
+ new SchemaRowsetName(OleDbMetaDataCollectionNames.ProcedureParameters, OleDbSchemaGuid.Procedure_Parameters),
+ new SchemaRowsetName(OleDbMetaDataCollectionNames.Tables, OleDbSchemaGuid.Tables),
+ new SchemaRowsetName(OleDbMetaDataCollectionNames.Views, OleDbSchemaGuid.Views)};
// verify the existance of the table in the data set
DataTable metaDataCollectionsTable = CollectionDataSet.Tables[DbMetaDataCollectionNames.MetaDataCollections];
private static readonly IList<SmiExtendedMetaData> s_emptyFieldList = new List<SmiExtendedMetaData>().AsReadOnly();
// Precision to max length lookup table
- private static readonly byte[] s_maxLenFromPrecision = new byte[] {5,5,5,5,5,5,5,5,5,9,9,9,9,9,
- 9,9,9,9,9,13,13,13,13,13,13,13,13,13,17,17,17,17,17,17,17,17,17,17};
+ private static readonly byte[] s_maxLenFromPrecision = new byte[]
+ {
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 13, 13, 13, 13, 13, 13, 13, 13, 13, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17
+ };
// Scale offset to max length lookup table
private static readonly byte[] s_maxVarTimeLenOffsetFromScale = new byte[] { 2, 2, 2, 1, 1, 0, 0, 0 };
// not need to support SetBytes
// bool, byte, bytes, chars, strng, int16, int32, int64, singl, doubl, sqldec, date, guid, varmd, Xetr, time, dtost
/*BigInt*/
- { _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, },
/*Binary*/
- { _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, },
/*Bit*/
- { X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, },
/*Char*/
- { _ , _ , _ , X , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, X, X, _, _, _, _, _, _, _, _, _, _, _, _, },
/*DTime*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, },
/*Decimal*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, },
/*Float*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, },
/*Image*/
- { _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, },
/*Int*/
- { _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, },
/*Money*/
- { _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, },
/*NChar*/
- { _ , _ , _ , X , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, X, X, _, _, _, _, _, _, _, _, _, _, _, _, },
/*NText*/
- { _ , _ , _ , X , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, X, X, _, _, _, _, _, _, _, _, _, _, _, _, },
/*NVarChar*/
- { _ , _ , _ , X , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, X, X, _, _, _, _, _, _, _, _, _, _, _, _, },
/*Real*/
- { _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, },
/*UniqueId*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, },
/*SmDTime*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, },
/*SmInt*/
- { _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, },
/*SmMoney*/
- { _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, },
/*Text*/
- { _ , _ , _ , X , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, X, X, _, _, _, _, _, _, _, _, _, _, _, _, },
/*Tstamp*/
- { _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, },
/*TinyInt*/
- { _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, },
/*VarBin*/
- { _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, },
/*VarChar*/
- { _ , _ , _ , X , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, X, X, _, _, _, _, _, _, _, _, _, _, _, _, },
/*Variant*/
- { X , X , X , X , X , X , X , X , X , X , X , X , X , X , _ , X , X , },
+ { X, X, X, X, X, X, X, X, X, X, X, X, X, X, _, X, X, },
/* 24 */
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, },
/*Xml*/
- { _ , _ , X , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, X, _, X, _, _, _, _, _, _, _, _, _, _, _, _, },
/* 26 */
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, },
/* 27 */
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, },
/* 28 */
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, },
/*Udt*/
- { _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , },
+ { _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, },
/*Struct*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , },
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, },
/*Date*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, },
/*Time*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , },
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, },
/*DTime2*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , },
+ { _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, },
/*DTOffset*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , },
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, },
};
// BI, Bin, Bit, Ch, DT, Dec, Fl, Im, Int, Mny, NCh, NTx, NVC, Rl, UI, SDT, SI, SMn, Txt, TS, TI, VBn, VCh, Var, 24, Xml, 26, 27, 28, Udt, St, Dat, Tm, DT2, DTO
/*Bool*/
- { _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Bool*/
+ { _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*Bool*/
/*Byte*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Byte*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*Byte*/
/*Char*/
- { _ , _ , _ , X , _ , _ , _ , _ , _ , _ , X , X , X , _ , _ , _ , _ , _ , X , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Char*/
+ { _, _, _, X, _, _, _, _, _, _, X, X, X, _, _, _, _, _, X, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, }, /*Char*/
/*DTime*/
- { _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, X , _ , X , _ , },/*DateTime*/
+ { _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, X, _, }, /*DateTime*/
/*DBNul*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*DBNull*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*DBNull*/
/*Decim*/
- { _ , _ , _ , _ , _ , X , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Decimal*/
+ { _, _, _, _, _, X, _, _, _, X, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*Decimal*/
/*Doubl*/
- { _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Double*/
+ { _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*Double*/
/*Empty*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Empty*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*Empty*/
/*Int16*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Int16*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*Int16*/
/*Int32*/
- { _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Int32*/
+ { _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*Int32*/
/*Int64*/
- { X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Int64*/
+ { X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*Int64*/
/*SByte*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SByte*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*SByte*/
/*Singl*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Single*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*Single*/
/*Strng*/
- { _ , _ , _ , X , _ , _ , _ , _ , _ , _ , X , X , X , _ , _ , _ , _ , _ , X , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*String*/
+ { _, _, _, X, _, _, _, _, _, _, X, X, X, _, _, _, _, _, X, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, }, /*String*/
/*UIn16*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*UInt16*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*UInt16*/
/*UIn32*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*UInt32*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*UInt32*/
/*UIn64*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*UInt64*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*UInt64*/
/*Objct*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _, _ , _ , _ , _ , },/*Object*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, }, /*Object*/
/*BytAr*/
- { _ , X , _ , X , _ , _ , _ , X , _ , _ , X , X , X , _ , _ , _ , _ , _ , X , X , _ , X , X , _ , _ , X , _ , _ , _ , X , _, _ , _ , _ , _ , },/*ByteArray*/
+ { _, X, _, X, _, _, _, X, _, _, X, X, X, _, _, _, _, _, X, X, _, X, X, _, _, X, _, _, _, X, _, _, _, _, _, }, /*ByteArray*/
/*ChrAr*/
- { _ , _ , _ , X , _ , _ , _ , _ , _ , _ , X , X , X , _ , _ , _ , _ , _ , X , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*CharArray*/
+ { _, _, _, X, _, _, _, _, _, _, X, X, X, _, _, _, _, _, X, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, }, /*CharArray*/
/*Guid*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Guid*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*Guid*/
/*SBin*/
- { _ , X , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , X , _ , _ , _ , _ , _ , _ , _ , X , _, _ , _ , _ , _ , },/*SqlBinary*/
+ { _, X, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, X, _, X, _, _, _, _, _, _, _, X, _, _, _, _, _, }, /*SqlBinary*/
/*SBool*/
- { _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlBoolean*/
+ { _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlBoolean*/
/*SByte*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlByte*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlByte*/
/*SDTme*/
- { _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, X , _ , X , _ , },/*SqlDateTime*/
+ { _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, X, _, }, /*SqlDateTime*/
/*SDubl*/
- { _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlDouble*/
+ { _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlDouble*/
/*SGuid*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlGuid*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlGuid*/
/*SIn16*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlInt16*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlInt16*/
/*SIn32*/
- { _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlInt32*/
+ { _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlInt32*/
/*SIn64*/
- { X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlInt64*/
+ { X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlInt64*/
/*SMony*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlMoney*/
+ { _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlMoney*/
/*SDeci*/
- { _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlDecimal*/
+ { _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlDecimal*/
/*SSngl*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlSingle*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlSingle*/
/*SStrn*/
- { _ , _ , _ , X , _ , _ , _ , _ , _ , _ , X , X , X , _ , _ , _ , _ , _ , X , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlString*/
+ { _, _, _, X, _, _, _, _, _, _, X, X, X, _, _, _, _, _, X, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlString*/
/*SChrs*/
- { _ , _ , _ , X , _ , _ , _ , _ , _ , _ , X , X , X , _ , _ , _ , _ , _ , X , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlChars*/
+ { _, _, _, X, _, _, _, _, _, _, X, X, X, _, _, _, _, _, X, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlChars*/
/*SByts*/
- { _ , X , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , X , _ , _ , _ , _ , _ , _ , _ , X , _, _ , _ , _ , _ , },/*SqlBytes*/
+ { _, X, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, X, _, X, _, _, _, _, _, _, _, X, _, _, _, _, _, }, /*SqlBytes*/
/*SXml*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlXml*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, }, /*SqlXml*/
/*DTbl*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X, _ , _ , _ , _ , },/*DataTable*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, }, /*DataTable*/
/*Rdr */
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X, _ , _ , _ , _ , },/*DbDataReader*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, }, /*DbDataReader*/
/*EnSDR*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X, _ , _ , _ , _ , },/*IEnurerable<SqlDataRecord>*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, }, /*IEnurerable<SqlDataRecord>*/
/*TmSpn*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , X , _ , _ , },/*TimeSpan*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, }, /*TimeSpan*/
/*DTOst*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , X , },/*DateTimeOffset*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, }, /*DateTimeOffset*/
/*Strm */
- { _ , X , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , X , _, _ , _ , _ , _ , },/*Stream*/
+ { _, X, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, X, _, _, _, _, _, }, /*Stream*/
/*TxRdr*/
- { _ , _ , _ , X , _ , _ , _ , _ , _ , _ , X , X , X , _ , _ , _ , _ , _ , X , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*TextReader*/
+ { _, _, _, X, _, _, _, _, _, _, X, X, X, _, _, _, _, _, X, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, }, /*TextReader*/
/*XmlRd*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*XmlReader*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*XmlReader*/
// BI, Bin, Bit, Ch, DT, Dec, Fl, Im, Int, Mny, NCh, NTx, NVC, Rl, UI, SDT, SI, SMn, Txt, TS, TI, VBn, VCh, Var, 24, Xml, 26, 27, 28, Udt, St, Dat, Tm, DT2, DTO
};
// SqlDbTypes as rows
// BI, Bin, Bit, Ch, DT, Dec, Fl, Im, Int, Mny, NCh, NTx, NVC, Rl, UI, SDT, SI, SMn, Txt, TS, TI, VBn, VCh, Var, 24, Xml, 26, 27, 28, Udt, St, Dat, Tm, DT2, DTO
/*Bool*/
- { _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Bool*/
+ { _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*Bool*/
/*Byte*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Byte*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*Byte*/
/*Char*/
- { _ , _ , _ , X , _ , _ , _ , _ , _ , _ , X , X , X , _ , _ , _ , _ , _ , X , _ , _ , _ , X , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Char*/
+ { _, _, _, X, _, _, _, _, _, _, X, X, X, _, _, _, _, _, X, _, _, _, X, X, _, _, _, _, _, _, _, _, _, _, _, }, /*Char*/
/*DTime*/
- { _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, X , _ , X , _ , },/*DateTime*/
+ { _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, X, _, X, _, }, /*DateTime*/
/*DBNul*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*DBNull*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*DBNull*/
/*Decim*/
- { _ , _ , _ , _ , _ , X , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Decimal*/
+ { _, _, _, _, _, X, _, _, _, X, _, _, _, _, _, _, _, X, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*Decimal*/
/*Doubl*/
- { _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Double*/
+ { _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*Double*/
/*Empty*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Empty*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*Empty*/
/*Int16*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Int16*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*Int16*/
/*Int32*/
- { _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Int32*/
+ { _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*Int32*/
/*Int64*/
- { X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Int64*/
+ { X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*Int64*/
/*SByte*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SByte*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*SByte*/
/*Singl*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Single*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*Single*/
/*Strng*/
- { _ , _ , _ , X , _ , _ , _ , _ , _ , _ , X , X , X , _ , _ , _ , _ , _ , X , _ , _ , _ , X , X , _ , X , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*String*/
+ { _, _, _, X, _, _, _, _, _, _, X, X, X, _, _, _, _, _, X, _, _, _, X, X, _, X, _, _, _, _, _, _, _, _, _, }, /*String*/
/*UIn16*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*UInt16*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*UInt16*/
/*UIn32*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*UInt32*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*UInt32*/
/*UIn64*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*UInt64*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*UInt64*/
/*Objct*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _, _ , _ , _ , _ , },/*Object*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, }, /*Object*/
/*BytAr*/
- { _ , X , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , X , _ , X , _ , X , _ , _ , _ , X , _, _ , _ , _ , _ , },/*ByteArray*/
+ { _, X, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, X, _, X, _, X, _, X, _, _, _, X, _, _, _, _, _, }, /*ByteArray*/
/*ChrAr*/
- { _ , _ , _ , X , _ , _ , _ , _ , _ , _ , X , X , X , _ , _ , _ , _ , _ , X , _ , _ , _ , X , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*CharArray*/
+ { _, _, _, X, _, _, _, _, _, _, X, X, X, _, _, _, _, _, X, _, _, _, X, X, _, _, _, _, _, _, _, _, _, _, _, }, /*CharArray*/
/*Guid*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Guid*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*Guid*/
/*SBin*/
- { _ , X , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , X , _ , X , _ , _ , _ , _ , _ , X , _, _ , _ , _ , _ , },/*SqlBinary*/
+ { _, X, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, X, _, X, _, X, _, _, _, _, _, X, _, _, _, _, _, }, /*SqlBinary*/
/*SBool*/
- { _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlBoolean*/
+ { _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlBoolean*/
/*SByte*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlByte*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlByte*/
/*SDTme*/
- { _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, X , _ , X , _ , },/*SqlDateTime*/
+ { _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, X, _, X, _, }, /*SqlDateTime*/
/*SDubl*/
- { _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlDouble*/
+ { _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlDouble*/
/*SGuid*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlGuid*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlGuid*/
/*SIn16*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlInt16*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlInt16*/
/*SIn32*/
- { _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlInt32*/
+ { _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlInt32*/
/*SIn64*/
- { X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlInt64*/
+ { X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlInt64*/
/*SMony*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlMoney*/
+ { _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, X, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlMoney*/
/*SDeci*/
- { _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlDecimal*/
+ { _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlDecimal*/
/*SSngl*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlSingle*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlSingle*/
/*SStrn*/
- { _ , _ , _ , X , _ , _ , _ , _ , _ , _ , X , X , X , _ , _ , _ , _ , _ , X , _ , _ , _ , X , X , _ , X , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlString*/
+ { _, _, _, X, _, _, _, _, _, _, X, X, X, _, _, _, _, _, X, _, _, _, X, X, _, X, _, _, _, _, _, _, _, _, _, }, /*SqlString*/
/*SChrs*/
- { _ , _ , _ , X , _ , _ , _ , _ , _ , _ , X , X , X , _ , _ , _ , _ , _ , X , _ , _ , _ , X , X , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlChars*/
+ { _, _, _, X, _, _, _, _, _, _, X, X, X, _, _, _, _, _, X, _, _, _, X, X, _, _, _, _, _, _, _, _, _, _, _, }, /*SqlChars*/
/*SByts*/
- { _ , X , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , X , _ , X , _ , _ , _ , _ , _ , X , _, _ , _ , _ , _ , },/*SqlBytes*/
+ { _, X, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, _, _, X, _, X, _, X, _, _, _, _, _, X, _, _, _, _, _, }, /*SqlBytes*/
/*SXml*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*SqlXml*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, }, /*SqlXml*/
/*DTbl*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X, _ , _ , _ , _ , },/*DataTable*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, }, /*DataTable*/
/*Rdr */
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X, _ , _ , _ , _ , },/*DbDataReader*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, }, /*DbDataReader*/
/*EnSDR*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , X, _ , _ , _ , _ , },/*IEnurerable<SqlDataRecord>*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, _, _, }, /*IEnurerable<SqlDataRecord>*/
/*TmSpn*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , X , _ , _ , },/*TimeSpan*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, _, _, }, /*TimeSpan*/
/*DTOst*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , X , },/*DateTimeOffset*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, X, }, /*DateTimeOffset*/
/*Strm */
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*Stream*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*Stream*/
/*TxRdr*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*TextReader*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*TextReader*/
/*XmlRd*/
- { _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _ , _, _ , _ , _ , _ , },/*XmlReader*/
+ { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, }, /*XmlReader*/
// BI, Bin, Bit, Ch, DT, Dec, Fl, Im, Int, Mny, NCh, NTx, NVC, Rl, UI, SDT, SI, SMn, Txt, TS, TI, VBn, VCh, Var, 24, Xml, 26, 27, 28, Udt, St, Dat, Tm, DT2, DTO
};
}
- private static readonly byte[] s_maxLenFromPrecision = new byte[] {5,5,5,5,5,5,5,5,5,9,9,9,9,9,
- 9,9,9,9,9,13,13,13,13,13,13,13,13,13,17,17,17,17,17,17,17,17,17,17};
+ private static readonly byte[] s_maxLenFromPrecision = new byte[]
+ {
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 13, 13, 13, 13, 13, 13, 13, 13, 13, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17
+ };
private const byte MaxTimeScale = 7;
new SqlMetaData("table", SqlDbType.Structured,
0, 0, 0, 0, SqlCompareOptions.None, false), // SqlDbType.Structured
new SqlMetaData("date", SqlDbType.Date,
- 3, 10,0, 0, SqlCompareOptions.None, false), // SqlDbType.Date
+ 3, 10, 0, 0, SqlCompareOptions.None, false), // SqlDbType.Date
new SqlMetaData("time", SqlDbType.Time,
5, 0, 7, 0, SqlCompareOptions.None, false), // SqlDbType.Time
new SqlMetaData("datetime2", SqlDbType.DateTime2,
parts[1] != null // server should not be null or we don't need to remove it
)
{
- parameter.TypeName = QuoteIdentifier(parts.AsSpan(2,2));
+ parameter.TypeName = QuoteIdentifier(parts.AsSpan(2, 2));
}
}
}
{
TaskCompletionSource<object> completion = new TaskCompletionSource<object>();
ContinueTaskWithState(task, completion,
- state: Tuple.Create(onSuccess, onFailure,completion),
+ state: Tuple.Create(onSuccess, onFailure, completion),
onSuccess: (state) => {
var parameters = (Tuple<Action, Action<Exception>, TaskCompletionSource<object>>)state;
Action success = parameters.Item1;
success();
taskCompletionSource.SetResult(null);
},
- onFailure: (exception,state) =>
+ onFailure: (exception, state) =>
{
var parameters = (Tuple<Action, Action<Exception>, TaskCompletionSource<object>>)state;
Action<Exception> failure = parameters.Item2;
}
}
- internal static Task CreateContinuationTaskWithState(Task task, object state, Action<object> onSuccess, Action<Exception,object> onFailure = null)
+ internal static Task CreateContinuationTaskWithState(Task task, object state, Action<object> onSuccess, Action<Exception, object> onFailure = null)
{
if (task == null)
{
internal enum EvtEventMetadataPropertyId
{
- EventMetadataEventID, // EvtVarTypeUInt32
- EventMetadataEventVersion, // EvtVarTypeUInt32
- EventMetadataEventChannel, // EvtVarTypeUInt32
- EventMetadataEventLevel, // EvtVarTypeUInt32
- EventMetadataEventOpcode, // EvtVarTypeUInt32
- EventMetadataEventTask, // EvtVarTypeUInt32
- EventMetadataEventKeyword, // EvtVarTypeUInt64
- EventMetadataEventMessageID,// EvtVarTypeUInt32
- EventMetadataEventTemplate // EvtVarTypeString
+ EventMetadataEventID, // EvtVarTypeUInt32
+ EventMetadataEventVersion, // EvtVarTypeUInt32
+ EventMetadataEventChannel, // EvtVarTypeUInt32
+ EventMetadataEventLevel, // EvtVarTypeUInt32
+ EventMetadataEventOpcode, // EvtVarTypeUInt32
+ EventMetadataEventTask, // EvtVarTypeUInt32
+ EventMetadataEventKeyword, // EvtVarTypeUInt64
+ EventMetadataEventMessageID, // EvtVarTypeUInt32
+ EventMetadataEventTemplate // EvtVarTypeString
// EvtEventMetadataPropertyIdEND
}
[DllImport(WEVTAPI, CharSet = CharSet.Auto, SetLastError = true)]
internal static extern EventLogHandle EvtCreateRenderContext(
int valuePathsCount,
- [MarshalAs(UnmanagedType.LPArray,ArraySubType = UnmanagedType.LPWStr)]
+ [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr)]
string[] valuePaths,
[MarshalAs(UnmanagedType.I4)]EvtRenderContextFlags flags
);
{PropertyNames.PwdInfoLastBadPasswordAttempt, "badPasswordTime", new FromLdapConverterDelegate(GenericDateTimeFromLdapConverter), null},
{PropertyNames.PwdInfoPasswordNotRequired, "ms-DS-UserPasswordNotRequired", new FromLdapConverterDelegate(BoolFromLdapConverter), new ToLdapConverterDelegate(BoolToLdapConverter)},
{PropertyNames.PwdInfoPasswordNeverExpires, "msDS-UserDontExpirePassword", new FromLdapConverterDelegate(BoolFromLdapConverter), new ToLdapConverterDelegate(BoolToLdapConverter)},
- {PropertyNames.PwdInfoCannotChangePassword, "ntSecurityDescriptor", null , new ToLdapConverterDelegate(CannotChangePwdToLdapConverter)},
+ {PropertyNames.PwdInfoCannotChangePassword, "ntSecurityDescriptor", null, new ToLdapConverterDelegate(CannotChangePwdToLdapConverter)},
{PropertyNames.PwdInfoAllowReversiblePasswordEncryption, "ms-DS-UserEncryptedTextPasswordAllowed", new FromLdapConverterDelegate(BoolFromLdapConverter), new ToLdapConverterDelegate(BoolToLdapConverter)}
};
{typeof(PermittedWorkstationFilter), "userWorkstations", new FilterConverterDelegate(StringConverter)},
{typeof(PermittedLogonTimesFilter), "logonHours", new FilterConverterDelegate(BinaryConverter)},
{typeof(ExpirationDateFilter), "accountExpires", new FilterConverterDelegate(ExpirationDateConverter)},
- {typeof(SmartcardLogonRequiredFilter), "userAccountControl", new FilterConverterDelegate(UserAccountControlConverter)},/*##*/
- {typeof(DelegationPermittedFilter), "userAccountControl", new FilterConverterDelegate(UserAccountControlConverter)},/*##*/
+ {typeof(SmartcardLogonRequiredFilter), "userAccountControl", new FilterConverterDelegate(UserAccountControlConverter)}, /*##*/
+ {typeof(DelegationPermittedFilter), "userAccountControl", new FilterConverterDelegate(UserAccountControlConverter)}, /*##*/
{typeof(HomeDirectoryFilter), "homeDirectory", new FilterConverterDelegate(StringConverter)},
{typeof(HomeDriveFilter), "homeDrive", new FilterConverterDelegate(StringConverter)},
{typeof(ScriptPathFilter), "scriptPath", new FilterConverterDelegate(StringConverter)},
- {typeof(PasswordNotRequiredFilter), "ms-DS-UserPasswordNotRequired", new FilterConverterDelegate(DefaultValueBoolConverter)},/*##*/
- {typeof(PasswordNeverExpiresFilter), "msDS-UserDontExpirePassword", new FilterConverterDelegate(DefaultValueBoolConverter)},/*##*/
- {typeof(CannotChangePasswordFilter), "userAccountControl", new FilterConverterDelegate(UserAccountControlConverter)},/*##*/
- {typeof(AllowReversiblePasswordEncryptionFilter), "ms-DS-UserEncryptedTextPasswordAllowed", new FilterConverterDelegate(DefaultValueBoolConverter)},/*##*/
+ {typeof(PasswordNotRequiredFilter), "ms-DS-UserPasswordNotRequired", new FilterConverterDelegate(DefaultValueBoolConverter)}, /*##*/
+ {typeof(PasswordNeverExpiresFilter), "msDS-UserDontExpirePassword", new FilterConverterDelegate(DefaultValueBoolConverter)}, /*##*/
+ {typeof(CannotChangePasswordFilter), "userAccountControl", new FilterConverterDelegate(UserAccountControlConverter)}, /*##*/
+ {typeof(AllowReversiblePasswordEncryptionFilter), "ms-DS-UserEncryptedTextPasswordAllowed", new FilterConverterDelegate(DefaultValueBoolConverter)}, /*##*/
{typeof(GivenNameFilter), "givenName", new FilterConverterDelegate(StringConverter)},
{typeof(MiddleNameFilter), "middleName", new FilterConverterDelegate(StringConverter)},
{typeof(SurnameFilter), "sn", new FilterConverterDelegate(StringConverter)},
{typeof(EmployeeIDFilter), "employeeID", new FilterConverterDelegate(StringConverter)},
{typeof(GroupIsSecurityGroupFilter), "groupType", new FilterConverterDelegate(GroupTypeConverter)},
{typeof(GroupScopeFilter), "groupType", new FilterConverterDelegate(GroupTypeConverter)},
- {typeof(ServicePrincipalNameFilter), "servicePrincipalName",new FilterConverterDelegate(StringConverter)},
- {typeof(ExtensionCacheFilter), null ,new FilterConverterDelegate(ExtensionCacheConverter)},
- {typeof(BadPasswordAttemptFilter), "badPasswordTime",new FilterConverterDelegate(DefaultValutMatchingDateTimeConverter)},
- {typeof(ExpiredAccountFilter), "accountExpires",new FilterConverterDelegate(MatchingDateTimeConverter)},
- {typeof(LastLogonTimeFilter), "lastLogonTimestamp",new FilterConverterDelegate(DefaultValutMatchingDateTimeConverter)},
- {typeof(LockoutTimeFilter), "lockoutTime",new FilterConverterDelegate(DefaultValutMatchingDateTimeConverter)},
- {typeof(PasswordSetTimeFilter), "pwdLastSet",new FilterConverterDelegate(DefaultValutMatchingDateTimeConverter)}
+ {typeof(ServicePrincipalNameFilter), "servicePrincipalName", new FilterConverterDelegate(StringConverter)},
+ {typeof(ExtensionCacheFilter), null, new FilterConverterDelegate(ExtensionCacheConverter)},
+ {typeof(BadPasswordAttemptFilter), "badPasswordTime", new FilterConverterDelegate(DefaultValutMatchingDateTimeConverter)},
+ {typeof(ExpiredAccountFilter), "accountExpires", new FilterConverterDelegate(MatchingDateTimeConverter)},
+ {typeof(LastLogonTimeFilter), "lastLogonTimestamp", new FilterConverterDelegate(DefaultValutMatchingDateTimeConverter)},
+ {typeof(LockoutTimeFilter), "lockoutTime", new FilterConverterDelegate(DefaultValutMatchingDateTimeConverter)},
+ {typeof(PasswordSetTimeFilter), "pwdLastSet", new FilterConverterDelegate(DefaultValutMatchingDateTimeConverter)}
};
}
}
{typeof(EmployeeIDFilter), "employeeID", new FilterConverterDelegate(StringConverter)},
{typeof(GroupIsSecurityGroupFilter), "groupType", new FilterConverterDelegate(GroupTypeConverter)},
{typeof(GroupScopeFilter), "groupType", new FilterConverterDelegate(GroupTypeConverter)},
- {typeof(ServicePrincipalNameFilter), "servicePrincipalName",new FilterConverterDelegate(StringConverter)},
- {typeof(ExtensionCacheFilter), null ,new FilterConverterDelegate(ExtensionCacheConverter)},
- {typeof(BadPasswordAttemptFilter), "badPasswordTime",new FilterConverterDelegate(DefaultValutMatchingDateTimeConverter)},
- {typeof(ExpiredAccountFilter), "accountExpires",new FilterConverterDelegate(MatchingDateTimeConverter)},
- {typeof(LastLogonTimeFilter), "lastLogon",new FilterConverterDelegate(LastLogonConverter)},
- {typeof(LockoutTimeFilter), "lockoutTime",new FilterConverterDelegate(MatchingDateTimeConverter)},
- {typeof(PasswordSetTimeFilter), "pwdLastSet",new FilterConverterDelegate(DefaultValutMatchingDateTimeConverter)},
- {typeof(BadLogonCountFilter), "badPwdCount",new FilterConverterDelegate(MatchingIntConverter)}
+ {typeof(ServicePrincipalNameFilter), "servicePrincipalName", new FilterConverterDelegate(StringConverter)},
+ {typeof(ExtensionCacheFilter), null, new FilterConverterDelegate(ExtensionCacheConverter)},
+ {typeof(BadPasswordAttemptFilter), "badPasswordTime", new FilterConverterDelegate(DefaultValutMatchingDateTimeConverter)},
+ {typeof(ExpiredAccountFilter), "accountExpires", new FilterConverterDelegate(MatchingDateTimeConverter)},
+ {typeof(LastLogonTimeFilter), "lastLogon", new FilterConverterDelegate(LastLogonConverter)},
+ {typeof(LockoutTimeFilter), "lockoutTime", new FilterConverterDelegate(MatchingDateTimeConverter)},
+ {typeof(PasswordSetTimeFilter), "pwdLastSet", new FilterConverterDelegate(DefaultValutMatchingDateTimeConverter)},
+ {typeof(BadLogonCountFilter), "badPwdCount", new FilterConverterDelegate(MatchingIntConverter)}
};
private static Hashtable s_filterPropertiesTable = null;
//
- {PropertyNames.AuthenticablePrincipalEnabled , typeof(UserPrincipal), "UserFlags", new FromWinNTConverterDelegate(UserFlagsFromWinNTConverter), new ToWinNTConverterDelegate(UserFlagsToWinNTConverter)},
+ {PropertyNames.AuthenticablePrincipalEnabled, typeof(UserPrincipal), "UserFlags", new FromWinNTConverterDelegate(UserFlagsFromWinNTConverter), new ToWinNTConverterDelegate(UserFlagsToWinNTConverter)},
{PropertyNames.AuthenticablePrincipalCertificates, typeof(UserPrincipal), "*******", new FromWinNTConverterDelegate(CertFromWinNTConverter), new ToWinNTConverterDelegate(CertToWinNT)},
//
{PropertyNames.GroupGroupScope, typeof(GroupPrincipal), "groupType", new FromWinNTConverterDelegate(GroupTypeFromWinNTConverter), new ToWinNTConverterDelegate(GroupTypeToWinNTConverter)},
//
- {PropertyNames.UserEmailAddress, typeof(UserPrincipal), "*******" , new FromWinNTConverterDelegate(EmailFromWinNTConverter), new ToWinNTConverterDelegate(EmailToWinNTConverter)},
+ {PropertyNames.UserEmailAddress, typeof(UserPrincipal), "*******", new FromWinNTConverterDelegate(EmailFromWinNTConverter), new ToWinNTConverterDelegate(EmailToWinNTConverter)},
//
{PropertyNames.AcctInfoLastLogon, typeof(UserPrincipal), "LastLogin", new FromWinNTConverterDelegate(DateFromWinNTConverter), null},
case AdsType.ADSTYPE_TYPEDNAME:
case AdsType.ADSTYPE_REPLICAPOINTER:
case AdsType.ADSTYPE_UNKNOWN:
- return new NotImplementedException(SR.Format(SR.DSAdsvalueTypeNYI , "0x" + Convert.ToString(adsvalue.dwType, 16)));
+ return new NotImplementedException(SR.Format(SR.DSAdsvalueTypeNYI, "0x" + Convert.ToString(adsvalue.dwType, 16)));
default:
- return new ArgumentException(SR.Format(SR.DSConvertFailed , "0x" + Convert.ToString(LowInt64, 16), "0x" + Convert.ToString(adsvalue.dwType, 16)));
+ return new ArgumentException(SR.Format(SR.DSConvertFailed, "0x" + Convert.ToString(LowInt64, 16), "0x" + Convert.ToString(adsvalue.dwType, 16)));
}
}
adsvalue.octetString.value = _pinnedHandle.AddrOfPinnedObject();
break;
default:
- throw new NotImplementedException(SR.Format(SR.DSAdsvalueTypeNYI , "0x" + Convert.ToString((int)adsType, 16)));
+ throw new NotImplementedException(SR.Format(SR.DSAdsvalueTypeNYI, "0x" + Convert.ToString((int)adsType, 16)));
}
}
}
// target must be a server
if ((!context.isServer()))
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.AINotFound , context.Name), typeof(AdamInstance), context.Name);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.AINotFound, context.Name), typeof(AdamInstance), context.Name);
}
// work with copy of the context
// This will ensure that we are talking to ADAM instance only
if (!Utils.CheckCapability(rootDSE, Capability.ActiveDirectoryApplicationMode))
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.AINotFound , context.Name), typeof(AdamInstance), context.Name);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.AINotFound, context.Name), typeof(AdamInstance), context.Name);
}
dnsHostName = (string)PropertyManager.GetPropertyValue(context, rootDSE, PropertyManager.DnsHostName);
}
if (errorCode == unchecked((int)0x8007203a))
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.AINotFound , context.Name), typeof(AdamInstance), context.Name);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.AINotFound, context.Name), typeof(AdamInstance), context.Name);
}
else
{
// this adam instance
if (!Partitions.Contains(value))
{
- throw new ArgumentException(SR.Format(SR.ServerNotAReplica , value), nameof(value));
+ throw new ArgumentException(SR.Format(SR.ServerNotAReplica, value), nameof(value));
}
ntdsaEntry.Properties[PropertyManager.MsDSDefaultNamingContext].Value = value;
}
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, context.Name));
}
try
}
else
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ServerNotFound , context.Name), typeof(ActiveDirectorySchema), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ServerNotFound, context.Name), typeof(ActiveDirectorySchema), null);
}
}
}
if ((context.isServer()) && (!Utils.CheckCapability(rootDSE, Capability.ActiveDirectoryOrADAM)))
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ServerNotFound , context.Name), typeof(ActiveDirectorySchema), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ServerNotFound, context.Name), typeof(ActiveDirectorySchema), null);
}
schemaNC = (string)PropertyManager.GetPropertyValue(context, rootDSE, PropertyManager.SchemaNamingContext);
}
else
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ServerNotFound , context.Name), typeof(ActiveDirectorySchema), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ServerNotFound, context.Name), typeof(ActiveDirectorySchema), null);
}
}
else
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, context.Name));
}
// set the bind flag
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , _context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, _context.Name));
}
// set the ldap display name property
Debug.Assert(values != null);
if (values.Count < 1 && mustExist)
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.PropertyNotFound , propertyName));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.PropertyNotFound, propertyName));
}
else if (values.Count > 0)
{
if (!value.isBound)
{
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , value.Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, value.Name));
}
if (!Contains(value))
}
else
{
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , value), nameof(value));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, value), nameof(value));
}
}
}
if (!schemaClass.isBound)
{
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , schemaClass.Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaClass.Name));
}
if (!Contains(schemaClass))
}
else
{
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , schemaClass), nameof(schemaClass));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, schemaClass), nameof(schemaClass));
}
}
if (!schemaClass.isBound)
{
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , schemaClass.Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaClass.Name));
}
for (int i = 0; i < InnerList.Count; i++)
return;
}
}
- throw new ArgumentException(SR.Format(SR.NotFoundInCollection , schemaClass), nameof(schemaClass));
+ throw new ArgumentException(SR.Format(SR.NotFoundInCollection, schemaClass), nameof(schemaClass));
}
public void Insert(int index, ActiveDirectorySchemaClass schemaClass)
if (!schemaClass.isBound)
{
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , schemaClass.Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaClass.Name));
}
if (!Contains(schemaClass))
}
else
{
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , schemaClass), nameof(schemaClass));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, schemaClass), nameof(schemaClass));
}
}
if (!schemaClass.isBound)
{
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , schemaClass.Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaClass.Name));
}
for (int i = 0; i < InnerList.Count; i++)
if (!schemaClass.isBound)
{
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , schemaClass.Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaClass.Name));
}
for (int i = 0; i < InnerList.Count; i++)
}
if (!((ActiveDirectorySchemaClass)value).isBound)
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , ((ActiveDirectorySchemaClass)value).Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, ((ActiveDirectorySchemaClass)value).Name));
}
internal string[] GetMultiValuedProperty()
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, context.Name));
}
// set the bind flag
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , _context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, _context.Name));
}
// set the ldap display name property
if (linkedProperties.Count != 1)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.LinkedPropertyNotFound , linkIdToSearch), typeof(ActiveDirectorySchemaProperty), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.LinkedPropertyNotFound, linkIdToSearch), typeof(ActiveDirectorySchemaProperty), null);
}
_linkedProperty = linkedProperties[0];
{
if (mustExist)
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.PropertyNotFound , propertyName));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.PropertyNotFound, propertyName));
}
}
else
return (ActiveDirectorySyntax)i;
}
}
- throw new ActiveDirectoryOperationException(SR.Format(SR.UnknownSyntax , _ldapDisplayName));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.UnknownSyntax, _ldapDisplayName));
}
private void SetSyntax(ActiveDirectorySyntax syntax)
if (!value.isBound)
{
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , value.Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, value.Name));
}
if (!Contains(value))
}
else
{
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , value), nameof(value));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, value), nameof(value));
}
}
}
if (!schemaProperty.isBound)
{
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , schemaProperty.Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaProperty.Name));
}
if (!Contains(schemaProperty))
}
else
{
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , schemaProperty), nameof(schemaProperty));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, schemaProperty), nameof(schemaProperty));
}
}
if (!schemaProperty.isBound)
{
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , schemaProperty.Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaProperty.Name));
}
for (int i = 0; i < InnerList.Count; i++)
return;
}
}
- throw new ArgumentException(SR.Format(SR.NotFoundInCollection , schemaProperty), nameof(schemaProperty));
+ throw new ArgumentException(SR.Format(SR.NotFoundInCollection, schemaProperty), nameof(schemaProperty));
}
public void Insert(int index, ActiveDirectorySchemaProperty schemaProperty)
if (!schemaProperty.isBound)
{
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , schemaProperty.Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaProperty.Name));
}
if (!Contains(schemaProperty))
}
else
{
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , schemaProperty), nameof(schemaProperty));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, schemaProperty), nameof(schemaProperty));
}
}
if (!schemaProperty.isBound)
{
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , schemaProperty.Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaProperty.Name));
}
for (int i = 0; i < InnerList.Count; i++)
if (!schemaProperty.isBound)
{
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , schemaProperty.Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaProperty.Name));
}
for (int i = 0; i < InnerList.Count; i++)
throw new ArgumentException(nameof(value));
if (!((ActiveDirectorySchemaProperty)value).isBound)
- throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted , ((ActiveDirectorySchemaProperty)value).Name));
+ throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, ((ActiveDirectorySchemaProperty)value).Name));
}
internal string[] GetMultiValuedProperty()
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, context.Name));
}
try
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, context.Name));
}
finally
{
{
if (e.ErrorCode == unchecked((int)0x80072030))
{
- string message = SR.Format(SR.NTDSSiteSetting , _name);
+ string message = SR.Format(SR.NTDSSiteSetting, _name);
throw new ActiveDirectoryOperationException(message, e, 0x2030);
}
throw ExceptionHelper.GetExceptionFromCOMException(context, e);
else
{
// should not happen
- string message = SR.Format(SR.UnknownTransport , transportName);
+ string message = SR.Format(SR.UnknownTransport, transportName);
throw new ActiveDirectoryOperationException(message);
}
else
{
// should not happen
- string message = SR.Format(SR.UnknownTransport , transport);
+ string message = SR.Format(SR.UnknownTransport, transport);
throw new ActiveDirectoryOperationException(message);
}
throw new ArgumentNullException(nameof(value));
if (!site.existing)
- throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted , site.Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, site.Name));
if (!Contains(site))
List[index] = site;
else
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , site), nameof(value));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, site), nameof(value));
}
}
throw new ArgumentNullException(nameof(site));
if (!site.existing)
- throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted , site.Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, site.Name));
if (!Contains(site))
return List.Add(site);
else
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , site), nameof(site));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, site), nameof(site));
}
public void AddRange(ActiveDirectorySite[] sites)
throw new ArgumentNullException(nameof(site));
if (!site.existing)
- throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted , site.Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, site.Name));
string dn = (string)PropertyManager.GetPropertyValue(site.context, site.cachedEntry, PropertyManager.DistinguishedName);
throw new ArgumentNullException(nameof(site));
if (!site.existing)
- throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted , site.Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, site.Name));
string dn = (string)PropertyManager.GetPropertyValue(site.context, site.cachedEntry, PropertyManager.DistinguishedName);
throw new ArgumentNullException(nameof(site));
if (!site.existing)
- throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted , site.Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, site.Name));
if (!Contains(site))
List.Insert(index, site);
else
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , site), nameof(site));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, site), nameof(site));
}
public void Remove(ActiveDirectorySite site)
throw new ArgumentNullException(nameof(site));
if (!site.existing)
- throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted , site.Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, site.Name));
string dn = (string)PropertyManager.GetPropertyValue(site.context, site.cachedEntry, PropertyManager.DistinguishedName);
}
// something that does not exist in the collectio
- throw new ArgumentException(SR.Format(SR.NotFoundInCollection , site), nameof(site));
+ throw new ArgumentException(SR.Format(SR.NotFoundInCollection, site), nameof(site));
}
protected override void OnClearComplete()
throw new ArgumentException(nameof(value));
if (!((ActiveDirectorySite)value).existing)
- throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted , ((ActiveDirectorySite)value).Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, ((ActiveDirectorySite)value).Name));
}
}
}
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, context.Name));
}
try
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, context.Name));
}
try
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, context.Name));
}
try
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, context.Name));
}
try
throw new ArgumentNullException(nameof(value));
if (!link.existing)
- throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted , link.Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, link.Name));
if (!Contains(link))
List[index] = link;
else
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , link), nameof(value));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, link), nameof(value));
}
}
throw new ArgumentNullException(nameof(link));
if (!link.existing)
- throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted , link.Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, link.Name));
if (!Contains(link))
return List.Add(link);
else
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , link), nameof(link));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, link), nameof(link));
}
public void AddRange(ActiveDirectorySiteLink[] links)
throw new ArgumentNullException(nameof(link));
if (!link.existing)
- throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted , link.Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, link.Name));
string dn = (string)PropertyManager.GetPropertyValue(link.context, link.cachedEntry, PropertyManager.DistinguishedName);
throw new ArgumentNullException(nameof(link));
if (!link.existing)
- throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted , link.Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, link.Name));
string dn = (string)PropertyManager.GetPropertyValue(link.context, link.cachedEntry, PropertyManager.DistinguishedName);
throw new ArgumentNullException("value");
if (!link.existing)
- throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted , link.Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, link.Name));
if (!Contains(link))
List.Insert(index, link);
else
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , link), nameof(link));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, link), nameof(link));
}
public void Remove(ActiveDirectorySiteLink link)
throw new ArgumentNullException(nameof(link));
if (!link.existing)
- throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted , link.Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, link.Name));
string dn = (string)PropertyManager.GetPropertyValue(link.context, link.cachedEntry, PropertyManager.DistinguishedName);
}
// something that does not exist in the collectio
- throw new ArgumentException(SR.Format(SR.NotFoundInCollection , link), nameof(link));
+ throw new ArgumentException(SR.Format(SR.NotFoundInCollection, link), nameof(link));
}
protected override void OnClearComplete()
throw new ArgumentException(nameof(value));
if (!((ActiveDirectorySiteLink)value).existing)
- throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted , ((ActiveDirectorySiteLink)value).Name));
+ throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, ((ActiveDirectorySiteLink)value).Name));
}
}
}
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, context.Name));
}
try
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, context.Name));
}
finally
{
}
catch (ActiveDirectoryObjectNotFoundException)
{
- throw new ArgumentException(SR.Format(SR.SiteNotExist , siteName), nameof(siteName));
+ throw new ArgumentException(SR.Format(SR.SiteNotExist, siteName), nameof(siteName));
}
}
}
catch (ActiveDirectoryObjectNotFoundException)
{
- throw new ArgumentException(SR.Format(SR.SiteNotExist , siteName), nameof(siteName));
+ throw new ArgumentException(SR.Format(SR.SiteNotExist, siteName), nameof(siteName));
}
}
{
// check whether the site exists or not, you can not create a new site and set it to a subnet object with commit change to site object first
if (!value.existing)
- throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted , value));
+ throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, value));
}
_site = value;
throw new ArgumentNullException(nameof(value));
if (!subnet.existing)
- throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted , subnet.Name));
+ throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, subnet.Name));
if (!Contains(subnet))
List[index] = subnet;
else
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , subnet), nameof(value));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, subnet), nameof(value));
}
}
throw new ArgumentNullException(nameof(subnet));
if (!subnet.existing)
- throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted , subnet.Name));
+ throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, subnet.Name));
if (!Contains(subnet))
return List.Add(subnet);
else
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , subnet), nameof(subnet));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, subnet), nameof(subnet));
}
public void AddRange(ActiveDirectorySubnet[] subnets)
throw new ArgumentNullException(nameof(subnet));
if (!subnet.existing)
- throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted , subnet.Name));
+ throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, subnet.Name));
string dn = (string)PropertyManager.GetPropertyValue(subnet.context, subnet.cachedEntry, PropertyManager.DistinguishedName);
throw new ArgumentNullException(nameof(subnet));
if (!subnet.existing)
- throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted , subnet.Name));
+ throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, subnet.Name));
string dn = (string)PropertyManager.GetPropertyValue(subnet.context, subnet.cachedEntry, PropertyManager.DistinguishedName);
throw new ArgumentNullException(nameof(subnet));
if (!subnet.existing)
- throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted , subnet.Name));
+ throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, subnet.Name));
if (!Contains(subnet))
List.Insert(index, subnet);
else
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , subnet), nameof(subnet));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, subnet), nameof(subnet));
}
public void Remove(ActiveDirectorySubnet subnet)
throw new ArgumentNullException(nameof(subnet));
if (!subnet.existing)
- throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted , subnet.Name));
+ throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, subnet.Name));
string dn = (string)PropertyManager.GetPropertyValue(subnet.context, subnet.cachedEntry, PropertyManager.DistinguishedName);
}
// something that does not exist in the collectio
- throw new ArgumentException(SR.Format(SR.NotFoundInCollection , subnet), nameof(subnet));
+ throw new ArgumentException(SR.Format(SR.NotFoundInCollection, subnet), nameof(subnet));
}
protected override void OnClear()
throw new ArgumentException(nameof(value));
if (!((ActiveDirectorySubnet)value).existing)
- throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted , ((ActiveDirectorySubnet)value).Name));
+ throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, ((ActiveDirectorySubnet)value).Name));
}
private string MakePath(string subnetDN)
catch (ActiveDirectoryObjectNotFoundException)
{
// this is the case where the context is a config set and we could not find an ADAM instance in that config set
- throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , context.Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, context.Name));
}
// build the filter
}
else
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.AINotFound , context.Name), typeof(ConfigurationSet), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.AINotFound, context.Name), typeof(ConfigurationSet), null);
}
}
rootDSE = directoryEntryMgr.GetCachedDirectoryEntry(WellKnownDN.RootDSE);
if ((context.isServer()) && (!Utils.CheckCapability(rootDSE, Capability.ActiveDirectoryApplicationMode)))
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.AINotFound , context.Name), typeof(ConfigurationSet), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.AINotFound, context.Name), typeof(ConfigurationSet), null);
}
configSetName = (string)PropertyManager.GetPropertyValue(context, rootDSE, PropertyManager.ConfigurationNamingContext);
}
else
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.AINotFound , context.Name), typeof(ConfigurationSet), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.AINotFound, context.Name), typeof(ConfigurationSet), null);
}
}
else
{
// if we are passed the timeout period, we should throw, else do nothing
if (DateTime.UtcNow.Subtract(startTime) > s_locationTimeout)
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , (configSetName != null) ? configSetName : context.Name), typeof(AdamInstance), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, (configSetName != null) ? configSetName : context.Name), typeof(AdamInstance), null);
}
else
throw ExceptionHelper.GetExceptionFromCOMException(context, e);
}
// if we reach here, we haven't found an adam instance
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet , (configSetName != null) ? configSetName : context.Name), typeof(AdamInstance), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ADAMInstanceNotFoundInConfigSet, (configSetName != null) ? configSetName : context.Name), typeof(AdamInstance), null);
}
/// <returns>Returns a DomainController object for the DC that holds the specified FSMO role</returns>
if (!Contains(server))
List[index] = server;
else
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , server), nameof(value));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, server), nameof(value));
}
}
}
else
{
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , server), nameof(server));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, server), nameof(server));
}
}
else
if (!Contains(server))
return List.Add(server);
else
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , server), nameof(server));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, server), nameof(server));
}
}
}
else
{
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , server), nameof(server));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, server), nameof(server));
}
}
else
if (!Contains(server))
List.Insert(index, server);
else
- throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection , server));
+ throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, server));
}
}
}
// something that does not exist in the collection
- throw new ArgumentException(SR.Format(SR.NotFoundInCollection , server), nameof(server));
+ throw new ArgumentException(SR.Format(SR.NotFoundInCollection, server), nameof(server));
}
protected override void OnClear()
}
else
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound , context.Name), typeof(Domain), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound, context.Name), typeof(Domain), null);
}
}
}
rootDSE = directoryEntryMgr.GetCachedDirectoryEntry(WellKnownDN.RootDSE);
if ((context.isServer()) && (!Utils.CheckCapability(rootDSE, Capability.ActiveDirectory)))
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound , context.Name), typeof(Domain), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound, context.Name), typeof(Domain), null);
}
defaultDomainNC = (string)PropertyManager.GetPropertyValue(context, rootDSE, PropertyManager.DefaultNamingContext);
}
}
else
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound , context.Name), typeof(Domain), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound, context.Name), typeof(Domain), null);
}
}
else
if (collection.Count == 0)
{
// trust relationship does not exist
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist , Name, targetDomainName), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist, Name, targetDomainName), typeof(TrustRelationshipInformation), null);
}
else
{
}
catch (ActiveDirectoryObjectNotFoundException)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection , Name, targetDomain.Name, direction), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, Name, targetDomain.Name, direction), typeof(TrustRelationshipInformation), null);
}
}
}
catch (ActiveDirectoryObjectNotFoundException)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection , Name, targetDomain.Name, direction), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, Name, targetDomain.Name, direction), typeof(TrustRelationshipInformation), null);
}
}
}
}
catch (ActiveDirectoryObjectNotFoundException)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection , Name, targetDomain.Name, direction), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, Name, targetDomain.Name, direction), typeof(TrustRelationshipInformation), null);
}
}
}
catch (ActiveDirectoryObjectNotFoundException)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection , Name, targetDomain.Name, direction), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, Name, targetDomain.Name, direction), typeof(TrustRelationshipInformation), null);
}
}
}
catch (ActiveDirectoryObjectNotFoundException)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection , Name, targetDomain.Name, direction), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, Name, targetDomain.Name, direction), typeof(TrustRelationshipInformation), null);
}
}
}
// target should be a server
if (!(context.isServer()))
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound , context.Name), typeof(DomainController), context.Name);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound, context.Name), typeof(DomainController), context.Name);
}
// work with copy of the context
DirectoryEntry rootDSE = directoryEntryMgr.GetCachedDirectoryEntry(WellKnownDN.RootDSE);
if (!Utils.CheckCapability(rootDSE, Capability.ActiveDirectory))
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound , context.Name), typeof(DomainController), context.Name);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound, context.Name), typeof(DomainController), context.Name);
}
dcDnsName = (string)PropertyManager.GetPropertyValue(context, rootDSE, PropertyManager.DnsHostName);
}
if (errorCode == unchecked((int)0x8007203a))
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound , context.Name), typeof(DomainController), context.Name);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound, context.Name), typeof(DomainController), context.Name);
}
else
{
}
if (cachedSiteName == null)
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.SiteNameNotFound , Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.SiteNameNotFound, Name));
}
return cachedSiteName;
}
if (cachedSiteObjectName == null)
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.SiteObjectNameNotFound , Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.SiteObjectNameNotFound, Name));
}
return cachedSiteObjectName;
}
}
if (_cachedComputerObjectName == null)
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.ComputerObjectNameNotFound , Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ComputerObjectNameNotFound, Name));
}
return _cachedComputerObjectName;
}
}
if (cachedServerObjectName == null)
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.ServerObjectNameNotFound , Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.ServerObjectNameNotFound, Name));
}
return cachedServerObjectName;
}
}
if (cachedNtdsaObjectName == null)
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.NtdsaObjectNameNotFound , Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.NtdsaObjectNameNotFound, Name));
}
return cachedNtdsaObjectName;
}
}
if (cachedNtdsaObjectGuid.Equals(Guid.Empty))
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.NtdsaObjectGuidNotFound , Name));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.NtdsaObjectGuidNotFound, Name));
}
return cachedNtdsaObjectGuid;
}
}
else
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFoundInDomain , context.Name), typeof(DomainController), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFoundInDomain, context.Name), typeof(DomainController), null);
}
}
else
if (e.ErrorCode == unchecked((int)0x8007203a))
{
// server is down
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFoundInDomain , context.Name), typeof(DomainController), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFoundInDomain, context.Name), typeof(DomainController), null);
}
else
{
if (errorCode == NativeMethods.ERROR_NO_SUCH_DOMAIN)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFoundInDomain , domainName), typeof(DomainController), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFoundInDomain, domainName), typeof(DomainController), null);
}
// this can only occur when flag is being explicitly passed (since the flags that we pass internally are valid)
if (errorCode == NativeMethods.ERROR_INVALID_FLAGS)
string s = base.Message;
if (!((Name == null) ||
(Name.Length == 0)))
- return s + Environment.NewLine + SR.Format(SR.Name , Name) + Environment.NewLine;
+ return s + Environment.NewLine + SR.Format(SR.Name, Name) + Environment.NewLine;
else
return s;
}
}
else
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound , context.Name), typeof(Forest), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound, context.Name), typeof(Forest), null);
}
}
}
rootDSE = directoryEntryMgr.GetCachedDirectoryEntry(WellKnownDN.RootDSE);
if ((context.isServer()) && (!Utils.CheckCapability(rootDSE, Capability.ActiveDirectory)))
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound , context.Name), typeof(Forest), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound, context.Name), typeof(Forest), null);
}
rootDomainNC = (string)PropertyManager.GetPropertyValue(context, rootDSE, PropertyManager.RootDomainNamingContext);
}
}
else
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound , context.Name), typeof(Forest), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DCNotFound, context.Name), typeof(Forest), null);
}
}
else
else
{
// trust relationship does not exist
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist , Name, targetForestName), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist, Name, targetForestName), typeof(TrustRelationshipInformation), null);
}
}
}
catch (ActiveDirectoryObjectNotFoundException)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection , Name, targetForest.Name, direction), typeof(ForestTrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, Name, targetForest.Name, direction), typeof(ForestTrustRelationshipInformation), null);
}
}
}
catch (ActiveDirectoryObjectNotFoundException)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection , Name, targetForest.Name, direction), typeof(ForestTrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, Name, targetForest.Name, direction), typeof(ForestTrustRelationshipInformation), null);
}
}
}
}
catch (ActiveDirectoryObjectNotFoundException)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection , Name, targetForest.Name, direction), typeof(ForestTrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, Name, targetForest.Name, direction), typeof(ForestTrustRelationshipInformation), null);
}
}
}
catch (ActiveDirectoryObjectNotFoundException)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection , Name, targetForest.Name, direction), typeof(ForestTrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, Name, targetForest.Name, direction), typeof(ForestTrustRelationshipInformation), null);
}
}
}
catch (ActiveDirectoryObjectNotFoundException)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection , Name, targetForest.Name, direction), typeof(ForestTrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, Name, targetForest.Name, direction), typeof(ForestTrustRelationshipInformation), null);
}
}
}
// target should be a server
if (!(context.isServer()))
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFound , context.Name), typeof(GlobalCatalog), context.Name);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFound, context.Name), typeof(GlobalCatalog), context.Name);
}
// work with copy of the context
DirectoryEntry rootDSE = DirectoryEntryManager.GetDirectoryEntry(context, WellKnownDN.RootDSE);
if (!Utils.CheckCapability(rootDSE, Capability.ActiveDirectory))
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFound , context.Name), typeof(GlobalCatalog), context.Name);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFound, context.Name), typeof(GlobalCatalog), context.Name);
}
gcDnsName = (string)PropertyManager.GetPropertyValue(context, rootDSE, PropertyManager.DnsHostName);
isGlobalCatalog = (bool)bool.Parse((string)PropertyManager.GetPropertyValue(context, rootDSE, PropertyManager.IsGlobalCatalogReady));
if (!isGlobalCatalog)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFound , context.Name), typeof(GlobalCatalog), context.Name);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFound, context.Name), typeof(GlobalCatalog), context.Name);
}
}
catch (COMException e)
if (errorCode == unchecked((int)0x8007203a))
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFound , context.Name), typeof(GlobalCatalog), context.Name);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFound, context.Name), typeof(GlobalCatalog), context.Name);
}
else
{
}
else
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFoundInForest , context.Name), typeof(GlobalCatalog), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFoundInForest, context.Name), typeof(GlobalCatalog), null);
}
}
else
if (e.ErrorCode == unchecked((int)0x8007203a))
{
// server is down
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFoundInForest , context.Name), typeof(GlobalCatalog), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFoundInForest, context.Name), typeof(GlobalCatalog), null);
}
else
{
if (errorCode == NativeMethods.ERROR_NO_SUCH_DOMAIN)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFoundInForest , forestName), typeof(GlobalCatalog), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.GCNotFoundInForest, forestName), typeof(GlobalCatalog), null);
}
// this can only occur when flag is being explicitly passed (since the flags that we pass internally are valid)
if (errorCode == NativeMethods.ERROR_INVALID_FLAGS)
{
if (directoryEntry.Properties[PropertyManager.DistinguishedName].Count != 0)
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.PropertyNotFoundOnObject , propertyName, directoryEntry.Properties[PropertyManager.DistinguishedName].Value));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.PropertyNotFoundOnObject, propertyName, directoryEntry.Properties[PropertyManager.DistinguishedName].Value));
}
else
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.PropertyNotFound , propertyName));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.PropertyNotFound, propertyName));
}
}
}
propertyValues = res.Properties[propertyName];
if ((propertyValues == null) || (propertyValues.Count < 1))
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.PropertyNotFound , propertyName));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.PropertyNotFound, propertyName));
}
}
catch (COMException e)
throw new ArgumentNullException(nameof(connection));
if (!connection.existingConnection)
- throw new InvalidOperationException(SR.Format(SR.ConnectionNotCommitted , connection.Name));
+ throw new InvalidOperationException(SR.Format(SR.ConnectionNotCommitted, connection.Name));
string dn = (string)PropertyManager.GetPropertyValue(connection.context, connection.cachedDirectoryEntry, PropertyManager.DistinguishedName);
throw new ArgumentNullException(nameof(connection));
if (!connection.existingConnection)
- throw new InvalidOperationException(SR.Format(SR.ConnectionNotCommitted , connection.Name));
+ throw new InvalidOperationException(SR.Format(SR.ConnectionNotCommitted, connection.Name));
string dn = (string)PropertyManager.GetPropertyValue(connection.context, connection.cachedDirectoryEntry, PropertyManager.DistinguishedName);
if (win32Error == STATUS_OBJECT_NAME_NOT_FOUND)
{
if (isForest)
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist , sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist, sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
else
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist , sourceName, targetName), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist, sourceName, targetName), typeof(TrustRelationshipInformation), null);
}
else
throw ExceptionHelper.GetExceptionFromErrorCode(win32Error, serverName);
if (win32Error == STATUS_OBJECT_NAME_NOT_FOUND)
{
if (isForest)
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist , sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist, sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
else
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist , sourceName, targetName), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist, sourceName, targetName), typeof(TrustRelationshipInformation), null);
}
else
throw ExceptionHelper.GetExceptionFromErrorCode(win32Error, serverName);
if (win32Error == STATUS_OBJECT_NAME_NOT_FOUND)
{
if (isForest)
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist , sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist, sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
else
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist , sourceName, targetName), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist, sourceName, targetName), typeof(TrustRelationshipInformation), null);
}
else
throw ExceptionHelper.GetExceptionFromErrorCode(win32Error, serverName);
if (result == ERROR_ALREADY_EXISTS)
{
if (isForest)
- throw new ActiveDirectoryObjectExistsException(SR.Format(SR.AlreadyExistingForestTrust , sourceName, targetName));
+ throw new ActiveDirectoryObjectExistsException(SR.Format(SR.AlreadyExistingForestTrust, sourceName, targetName));
else
- throw new ActiveDirectoryObjectExistsException(SR.Format(SR.AlreadyExistingDomainTrust , sourceName, targetName));
+ throw new ActiveDirectoryObjectExistsException(SR.Format(SR.AlreadyExistingDomainTrust, sourceName, targetName));
}
else
throw ExceptionHelper.GetExceptionFromErrorCode(result, serverName);
if (win32Error == STATUS_OBJECT_NAME_NOT_FOUND)
{
if (isForest)
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist , sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist, sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
else
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist , sourceName, targetName), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist, sourceName, targetName), typeof(TrustRelationshipInformation), null);
}
else
throw ExceptionHelper.GetExceptionFromErrorCode(win32Error, serverName);
if (win32Error == STATUS_OBJECT_NAME_NOT_FOUND)
{
if (isForest)
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist , sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist, sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
else
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist , sourceName, targetName), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist, sourceName, targetName), typeof(TrustRelationshipInformation), null);
}
else
throw ExceptionHelper.GetExceptionFromErrorCode(win32Error, serverName);
if (win32Error == STATUS_OBJECT_NAME_NOT_FOUND)
{
if (isForest)
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist , sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist, sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
else
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist , sourceName, targetName), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.DomainTrustDoesNotExist, sourceName, targetName), typeof(TrustRelationshipInformation), null);
}
else
throw ExceptionHelper.GetExceptionFromErrorCode(win32Error, serverName);
if ((direction & domainInfo.TrustDirection) == 0)
{
if (isForest)
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection , sourceName, targetName, (TrustDirection)direction), typeof(ForestTrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, sourceName, targetName, (TrustDirection)direction), typeof(ForestTrustRelationshipInformation), null);
else
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection , sourceName, targetName, (TrustDirection)direction), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongTrustDirection, sourceName, targetName, (TrustDirection)direction), typeof(TrustRelationshipInformation), null);
}
}
}
// it should be a forest trust, make sure that TRUST_ATTRIBUTE_FOREST_TRANSITIVE bit is set
if ((domainInfo.TrustAttributes & TRUST_ATTRIBUTE.TRUST_ATTRIBUTE_FOREST_TRANSITIVE) == 0)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist , sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.ForestTrustDoesNotExist, sourceName, targetName), typeof(ForestTrustRelationshipInformation), null);
}
}
else
// it should not be a forest trust, make sure that TRUST_ATTRIBUTE_FOREST_TRANSITIVE bit is not set
if ((domainInfo.TrustAttributes & TRUST_ATTRIBUTE.TRUST_ATTRIBUTE_FOREST_TRANSITIVE) != 0)
{
- throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongForestTrust , sourceName, targetName), typeof(TrustRelationshipInformation), null);
+ throw new ActiveDirectoryObjectNotFoundException(SR.Format(SR.WrongForestTrust, sourceName, targetName), typeof(TrustRelationshipInformation), null);
}
// we don't deal with NT4 trust also
{
if (resCol.Count != 2)
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostNameOrPortNumber , dn));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostNameOrPortNumber, dn));
}
foreach (SearchResult res in resCol)
if ((ldapPort == -1) || (dnsHostName == null))
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostNameOrPortNumber , dn));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostNameOrPortNumber, dn));
}
return dnsHostName + ":" + ldapPort;
{
if (resCol.Count != 2)
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostNameOrPortNumber , dn));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostNameOrPortNumber, dn));
}
foreach (SearchResult res in resCol)
if ((ldapPort == -1) || (sslPort == -1) || (dnsHostName == null))
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostNameOrPortNumber , dn));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostNameOrPortNumber, dn));
}
return dnsHostName + ":" + ldapPort + ":" + sslPort;
return ActiveDirectoryTransportType.Smtp;
else
{
- string message = SR.Format(SR.UnknownTransport , transportName);
+ string message = SR.Format(SR.UnknownTransport, transportName);
throw new ActiveDirectoryOperationException(message);
}
}
Debug.Fail($"ConfigurationSet::GetReplicaList - no dnsHostName information for replica {ntdsaName}");
if (isADAM)
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostNameOrPortNumber , ntdsaName));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostNameOrPortNumber, ntdsaName));
}
else
{
- throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostName , ntdsaName));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostName, ntdsaName));
}
}
if (serverPorts[ntdsaName] == null)
{
Debug.Fail($"ConfigurationSet::GetReplicaList - no port number information for replica {ntdsaName}");
- throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostNameOrPortNumber , ntdsaName));
+ throw new ActiveDirectoryOperationException(SR.Format(SR.NoHostNameOrPortNumber, ntdsaName));
}
}
private void CheckIsContainer()
{
if (!_container.IsContainer)
- throw new InvalidOperationException(SR.Format(SR.DSNotAContainer , _container.Path));
+ throw new InvalidOperationException(SR.Format(SR.DSNotAContainer, _container.Path));
}
/// <devdoc>
public DirectoryEntry CopyTo(DirectoryEntry newParent, string newName)
{
if (!newParent.IsContainer)
- throw new InvalidOperationException(SR.Format(SR.DSNotAContainer , newParent.Path));
+ throw new InvalidOperationException(SR.Format(SR.DSNotAContainer, newParent.Path));
object copy = null;
try
{
object newEntry = null;
if (!(newParent.AdsObject is UnsafeNativeMethods.IAdsContainer))
- throw new InvalidOperationException(SR.Format(SR.DSNotAContainer , newParent.Path));
+ throw new InvalidOperationException(SR.Format(SR.DSNotAContainer, newParent.Path));
try
{
if (AdsObject.ADsPath.StartsWith("WinNT:", StringComparison.Ordinal))
UnsafeNativeMethods.IAds adsObject = clonedRoot.AdsObject;
if (!(adsObject is UnsafeNativeMethods.IDirectorySearch))
- throw new NotSupportedException(SR.Format(SR.DSSearchUnsupported , SearchRoot.Path));
+ throw new NotSupportedException(SR.Format(SR.DSSearchUnsupported, SearchRoot.Path));
// this is a little bit hacky, but we need to perform a bind here, so we make sure the LDAP connection that we hold has more than
// one reference count, one by SearchResultCollection object, one by DirectorySearcher object. In this way, when user calls
{
//throw a clearer exception if the filter was invalid
if (hr == UnsafeNativeMethods.INVALID_FILTER)
- throw new ArgumentException(SR.Format(SR.DSInvalidSearchFilter , _results.Filter));
+ throw new ArgumentException(SR.Format(SR.DSInvalidSearchFilter, _results.Filter));
if (hr != 0)
throw COMExceptionHelper.CreateFormattedComException(hr);
}
//throw a clearer exception if the filter was invalid
if (hr == UnsafeNativeMethods.INVALID_FILTER)
- throw new ArgumentException(SR.Format(SR.DSInvalidSearchFilter , _results.Filter));
+ throw new ArgumentException(SR.Format(SR.DSInvalidSearchFilter, _results.Filter));
if (hr != 0)
throw COMExceptionHelper.CreateFormattedComException(hr);
namespace System.Drawing
{
- public sealed partial class Graphics : MarshalByRefObject, IDisposable
- , IDeviceContext
+ public sealed partial class Graphics : MarshalByRefObject, IDisposable, IDeviceContext
{
internal IMacContext maccontext;
private bool disposed = false;
/// Defines an object used to draw lines and curves.
/// </summary>
public sealed partial class Pen : MarshalByRefObject, ICloneable, IDisposable
+#pragma warning disable SA1001
#if FEATURE_SYSTEM_EVENTS
, ISystemColorTracker
#endif
+#pragma warning restore SA1001
{
#if FINALIZATION_WATCH
- private string allocationSite = Graphics.GetAllocationStack();
+ private string _allocationSite = Graphics.GetAllocationStack();
#endif
// Handle to native GDI+ pen object.
#if FINALIZATION_WATCH
if (!disposing && nativePen != IntPtr.Zero)
{
- Debug.WriteLine("**********************\nDisposed through finalization:\n" + allocationSite);
+ Debug.WriteLine("**********************\nDisposed through finalization:\n" + _allocationSite);
}
#endif
#endif
public sealed class SolidBrush : Brush
+#pragma warning disable SA1001
#if FEATURE_SYSTEM_EVENTS
, ISystemColorTracker
#endif
+#pragma warning restore SA1001
{
// GDI+ doesn't understand system colors, so we need to cache the value here.
private Color _color = Color.Empty;
// Extra bits for length code 257 - 285.
private static readonly byte[] s_extraLengthBits =
- { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,16 };
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3,
+ 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 16
+ };
// The base length for length code 257 - 285.
// The formula to get the real length for a length code is lengthBase[code - 257] + (value stored in extraBits)
private static readonly int[] s_lengthBase =
- { 3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,3};
+ {
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51,
+ 59, 67, 83, 99, 115, 131, 163, 195, 227, 3
+ };
// The base distance for distance code 0 - 31
// The real distance for a distance code is distanceBasePosition[code] + (value stored in extraBits)
private static readonly int[] s_distanceBasePosition =
- { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,32769,49153 };
+ {
+ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513,
+ 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 32769, 49153
+ };
// code lengths for code length alphabet is stored in following order
private static readonly byte[] s_codeOrder = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 };
private static readonly byte[] s_staticDistanceTreeTable =
{
- 0x00,0x10,0x08,0x18,0x04,0x14,0x0c,0x1c,0x02,0x12,0x0a,0x1a,
- 0x06,0x16,0x0e,0x1e,0x01,0x11,0x09,0x19,0x05,0x15,0x0d,0x1d,
- 0x03,0x13,0x0b,0x1b,0x07,0x17,0x0f,0x1f
+ 0x00, 0x10, 0x08, 0x18, 0x04, 0x14, 0x0c, 0x1c, 0x02, 0x12, 0x0a, 0x1a,
+ 0x06, 0x16, 0x0e, 0x1e, 0x01, 0x11, 0x09, 0x19, 0x05, 0x15, 0x0d, 0x1d,
+ 0x03, 0x13, 0x0b, 0x1b, 0x07, 0x17, 0x0f, 0x1f
};
private readonly OutputWindow _output;
//This array is sorted by the ascii value of these characters.
private static readonly char[] s_allowedCharacters =
- { '!' /*33*/, '#' /*35*/ , '$' /*36*/,
- '%' /*37*/, '&' /*38*/ , '\'' /*39*/,
- '*' /*42*/, '+' /*43*/ , '-' /*45*/,
- '.' /*46*/, '^' /*94*/ , '_' /*95*/,
- '`' /*96*/, '|' /*124*/, '~' /*126*/,
- };
+ {
+ '!' /*33*/, '#' /*35*/, '$' /*36*/,
+ '%' /*37*/, '&' /*38*/, '\'' /*39*/,
+ '*' /*42*/, '+' /*43*/, '-' /*45*/,
+ '.' /*46*/, '^' /*94*/, '_' /*95*/,
+ '`' /*96*/, '|' /*124*/, '~' /*126*/,
+ };
//Linear White Space characters
private static readonly char[] s_linearWhiteSpaceChars =
/// <typeparam name="TInputOutput">The kind of elements.</typeparam>
/// <typeparam name="THashKey">The key used to distribute elements.</typeparam>
/// <typeparam name="TIgnoreKey">The kind of keys found in the source (ignored).</typeparam>
- internal class HashRepartitionEnumerator<TInputOutput, THashKey, TIgnoreKey> : QueryOperatorEnumerator<Pair<TInputOutput,THashKey>, int>
+ internal class HashRepartitionEnumerator<TInputOutput, THashKey, TIgnoreKey> : QueryOperatorEnumerator<Pair<TInputOutput, THashKey>, int>
{
private const int ENUMERATION_NOT_STARTED = -1; // Sentinel to note we haven't begun enumerating yet.
private readonly int _partitionIndex; // Our unique partition index.
private readonly Func<TInputOutput, THashKey> _keySelector; // A key-selector function.
private readonly HashRepartitionStream<TInputOutput, THashKey, int> _repartitionStream; // A repartitioning stream.
- private readonly ListChunk<Pair<TInputOutput,THashKey>>[][] _valueExchangeMatrix; // Matrix to do inter-task communication.
+ private readonly ListChunk<Pair<TInputOutput, THashKey>>[][] _valueExchangeMatrix; // Matrix to do inter-task communication.
private readonly QueryOperatorEnumerator<TInputOutput, TIgnoreKey> _source; // The immediate source of data.
private CountdownEvent _barrier; // Used to signal and wait for repartitions to complete.
private readonly CancellationToken _cancellationToken; // A token for canceling the process.
private class Mutables
{
internal int _currentBufferIndex; // Current buffer index.
- internal ListChunk<Pair<TInputOutput,THashKey>> _currentBuffer; // The buffer we're currently enumerating.
+ internal ListChunk<Pair<TInputOutput, THashKey>> _currentBuffer; // The buffer we're currently enumerating.
internal int _currentIndex; // Current index into the buffer.
internal Mutables()
internal HashRepartitionEnumerator(
QueryOperatorEnumerator<TInputOutput, TIgnoreKey> source, int partitionCount, int partitionIndex,
Func<TInputOutput, THashKey> keySelector, HashRepartitionStream<TInputOutput, THashKey, int> repartitionStream,
- CountdownEvent barrier, ListChunk<Pair<TInputOutput,THashKey>>[][] valueExchangeMatrix, CancellationToken cancellationToken)
+ CountdownEvent barrier, ListChunk<Pair<TInputOutput, THashKey>>[][] valueExchangeMatrix, CancellationToken cancellationToken)
{
Debug.Assert(source != null);
Debug.Assert(keySelector != null || typeof(THashKey) == typeof(NoKeyMemoizationRequired));
// anyway, so having the repartitioning operator do so isn't complicating matters much at all.
//
- internal override bool MoveNext(ref Pair<TInputOutput,THashKey> currentElement, ref int currentKey)
+ internal override bool MoveNext(ref Pair<TInputOutput, THashKey> currentElement, ref int currentKey)
{
if (_partitionCount == 1)
{
#endif
if (_source.MoveNext(ref current, ref keyUnused))
{
- currentElement = new Pair<TInputOutput,THashKey>(
+ currentElement = new Pair<TInputOutput, THashKey>(
current, _keySelector == null ? default(THashKey) : _keySelector(current));
return true;
}
Mutables mutables = _mutables;
Debug.Assert(mutables != null);
- ListChunk<Pair<TInputOutput,THashKey>>[] privateBuffers = new ListChunk<Pair<TInputOutput,THashKey>>[_partitionCount];
+ ListChunk<Pair<TInputOutput, THashKey>>[] privateBuffers = new ListChunk<Pair<TInputOutput, THashKey>>[_partitionCount];
TInputOutput element = default(TInputOutput);
TIgnoreKey ignoreKey = default(TIgnoreKey);
/// <typeparam name="TInputOutput"></typeparam>
/// <typeparam name="THashKey"></typeparam>
/// <typeparam name="TOrderKey"></typeparam>
- internal abstract class HashRepartitionStream<TInputOutput, THashKey, TOrderKey> : PartitionedStream<Pair<TInputOutput,THashKey>, TOrderKey>
+ internal abstract class HashRepartitionStream<TInputOutput, THashKey, TOrderKey> : PartitionedStream<Pair<TInputOutput, THashKey>, TOrderKey>
{
private readonly IEqualityComparer<THashKey> _keyComparer; // The optional key comparison routine.
private readonly IEqualityComparer<TInputOutput> _elementComparer; // The optional element comparison routine.
/// <typeparam name="TInputOutput">The kind of elements.</typeparam>
/// <typeparam name="THashKey">The key used to distribute elements.</typeparam>
/// <typeparam name="TOrderKey">The kind of keys found in the source.</typeparam>
- internal class OrderedHashRepartitionEnumerator<TInputOutput, THashKey, TOrderKey> : QueryOperatorEnumerator<Pair<TInputOutput,THashKey>, TOrderKey>
+ internal class OrderedHashRepartitionEnumerator<TInputOutput, THashKey, TOrderKey> : QueryOperatorEnumerator<Pair<TInputOutput, THashKey>, TOrderKey>
{
private const int ENUMERATION_NOT_STARTED = -1; // Sentinel to note we haven't begun enumerating yet.
private readonly int _partitionIndex; // Our unique partition index.
private readonly Func<TInputOutput, THashKey> _keySelector; // A key-selector function.
private readonly HashRepartitionStream<TInputOutput, THashKey, TOrderKey> _repartitionStream; // A repartitioning stream.
- private readonly ListChunk<Pair<TInputOutput,THashKey>>[][] _valueExchangeMatrix; // Matrix to do inter-task communication of values.
+ private readonly ListChunk<Pair<TInputOutput, THashKey>>[][] _valueExchangeMatrix; // Matrix to do inter-task communication of values.
private readonly ListChunk<TOrderKey>[][] _keyExchangeMatrix; // Matrix to do inter-task communication of order keys.
private readonly QueryOperatorEnumerator<TInputOutput, TOrderKey> _source; // The immediate source of data.
private CountdownEvent _barrier; // Used to signal and wait for repartitions to complete.
//
private void WrapPartitionedStreamHelper<TLeftKey, TRightKey>(
- PartitionedStream<Pair<TInputOutput,NoKeyMemoizationRequired>, TLeftKey> leftHashStream, PartitionedStream<TInputOutput, TRightKey> rightPartitionedStream,
+ PartitionedStream<Pair<TInputOutput, NoKeyMemoizationRequired>, TLeftKey> leftHashStream, PartitionedStream<TInputOutput, TRightKey> rightPartitionedStream,
IPartitionedStreamRecipient<TInputOutput> outputRecipient, CancellationToken cancellationToken)
{
int partitionCount = leftHashStream.PartitionCount;
if (_outputEnumerator.MoveNext())
{
- Pair<TInputOutput,TLeftKey> currentPair = _outputEnumerator.Current.Value;
+ Pair<TInputOutput, TLeftKey> currentPair = _outputEnumerator.Current.Value;
currentElement = currentPair.First;
currentKey = currentPair.Second;
return true;
//
private void WrapPartitionedStreamHelper<TLeftKey, TRightKey>(
- PartitionedStream<Pair<TLeftInput,TKey>, TLeftKey> leftHashStream, PartitionedStream<TRightInput, TRightKey> rightPartitionedStream,
+ PartitionedStream<Pair<TLeftInput, TKey>, TLeftKey> leftHashStream, PartitionedStream<TRightInput, TRightKey> rightPartitionedStream,
IPartitionedStreamRecipient<TOutput> outputRecipient, int partitionCount, CancellationToken cancellationToken)
{
if (RightChild.OutputOrdered)
// Ensure that the object is valid
Get();
ManagementClassGenerator classGen = new ManagementClassGenerator(this);
- return classGen.GenerateCode(includeSystemClassInClassDef,systemPropertyClass);
+ return classGen.GenerateCode(includeSystemClassInClassDef, systemPropertyClass);
}
/// cls.GetStronglyTypedClassCode(CodeLanguage.CSharp,"C:\temp\Logicaldisk.cs",String.Empty);
/// </code>
/// </example>
- public bool GetStronglyTypedClassCode(CodeLanguage lang, string filePath,string classNamespace)
+ public bool GetStronglyTypedClassCode(CodeLanguage lang, string filePath, string classNamespace)
{
// Ensure that the object is valid
Get();
ManagementClassGenerator classGen = new ManagementClassGenerator(this);
- return classGen.GenerateCode(lang , filePath,classNamespace);
+ return classGen.GenerateCode(lang, filePath, classNamespace);
}
}//ManagementClass
var tempString = dmtf.Substring(0, 4);
if (("****" != tempString))
{
- year = int.Parse(tempString,frmInt32);
+ year = int.Parse(tempString, frmInt32);
}
tempString = dmtf.Substring(4, 2);
if (("**" != tempString))
{
- month = int.Parse(tempString,frmInt32);
+ month = int.Parse(tempString, frmInt32);
}
tempString = dmtf.Substring(6, 2);
if (("**" != tempString))
{
- day = int.Parse(tempString,frmInt32);
+ day = int.Parse(tempString, frmInt32);
}
tempString = dmtf.Substring(8, 2);
if (("**" != tempString))
{
- hour = int.Parse(tempString,frmInt32);
+ hour = int.Parse(tempString, frmInt32);
}
tempString = dmtf.Substring(10, 2);
if (("**" != tempString))
{
- minute = int.Parse(tempString,frmInt32);
+ minute = int.Parse(tempString, frmInt32);
}
tempString = dmtf.Substring(12, 2);
if (("**" != tempString))
{
- second = int.Parse(tempString,frmInt32);
+ second = int.Parse(tempString, frmInt32);
}
tempString = dmtf.Substring(15, 6);
if (("******" != tempString))
{
- ticks = (long.Parse(tempString,(IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(long)))) * (TimeSpan.TicksPerMillisecond/1000);
+ ticks = (long.Parse(tempString, (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(long)))) * (TimeSpan.TicksPerMillisecond/1000);
}
tempString = dmtf.Substring(22, 3);
if (("***" != tempString))
{
tempString = dmtf.Substring(21, 4);
- utcOffset = int.Parse(tempString,frmInt32);
+ utcOffset = int.Parse(tempString, frmInt32);
}
if ( year < 0 || month < 0 || day < 0 || hour < 0 || minute < 0 || second < 0 || ticks < 0)
else
if ((tickOffset.Ticks >= 0))
{
- UtcString = "+" + ((tickOffset.Ticks / System.TimeSpan.TicksPerMinute)).ToString(frmInt32).PadLeft(3,'0');
+ UtcString = "+" + ((tickOffset.Ticks / System.TimeSpan.TicksPerMinute)).ToString(frmInt32).PadLeft(3, '0');
}
else
{
string strTemp = OffsetMins.ToString(frmInt32);
- UtcString = "-" + strTemp.Substring(1, strTemp.Length-1).PadLeft(3,'0');
+ UtcString = "-" + strTemp.Substring(1, strTemp.Length-1).PadLeft(3, '0');
}
- string dmtfDateTime = date.Year.ToString(frmInt32).PadLeft(4,'0');
+ string dmtfDateTime = date.Year.ToString(frmInt32).PadLeft(4, '0');
dmtfDateTime = (dmtfDateTime + date.Month.ToString(frmInt32).PadLeft(2, '0'));
dmtfDateTime = (dmtfDateTime + date.Day.ToString(frmInt32).PadLeft(2, '0'));
// Construct a DateTime with the precision to Second as same as the passed DateTime and so get
// the ticks difference so that the microseconds can be calculated
- DateTime dtTemp = new DateTime(date.Year ,date.Month,date.Day ,date.Hour ,date.Minute ,date.Second,0);
+ DateTime dtTemp = new DateTime(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second, 0);
long microsec = ((date.Ticks-dtTemp.Ticks) * 1000) / System.TimeSpan.TicksPerMillisecond;
// fill the microseconds field
string strMicrosec = microsec.ToString((IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(long)));
if (strMicrosec.Length > 6)
{
- strMicrosec = strMicrosec.Substring(0,6);
+ strMicrosec = strMicrosec.Substring(0, 6);
}
- dmtfDateTime = dmtfDateTime + strMicrosec.PadLeft(6,'0');
+ dmtfDateTime = dmtfDateTime + strMicrosec.PadLeft(6, '0');
// adding the UTC offset
dmtfDateTime = dmtfDateTime + UtcString;
{
throw new System.ArgumentOutOfRangeException(nameof(dmtfTimespan));
}
- if (dmtfts.Substring(21,4) != ":000")
+ if (dmtfts.Substring(21, 4) != ":000")
{
throw new System.ArgumentOutOfRangeException(nameof(dmtfTimespan));
}
string tempString = string.Empty;
tempString = dmtfts.Substring(0, 8);
- days = int.Parse(tempString,frmInt32);
+ days = int.Parse(tempString, frmInt32);
tempString = dmtfts.Substring(8, 2);
- hours = int.Parse(tempString,frmInt32);
+ hours = int.Parse(tempString, frmInt32);
tempString = dmtfts.Substring(10, 2);
- minutes = int.Parse(tempString,frmInt32);
+ minutes = int.Parse(tempString, frmInt32);
tempString = dmtfts.Substring(12, 2);
- seconds = int.Parse(tempString,frmInt32);
+ seconds = int.Parse(tempString, frmInt32);
tempString = dmtfts.Substring(15, 6);
- ticks = (long.Parse(tempString,(IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(long)))) * (System.TimeSpan.TicksPerMillisecond/1000);
+ ticks = (long.Parse(tempString, (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(long)))) * (System.TimeSpan.TicksPerMillisecond/1000);
}
catch
public static string ToDmtfTimeInterval(TimeSpan timespan)
{
- string dmtftimespan = timespan.Days.ToString((IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(int))).PadLeft(8,'0');
+ string dmtftimespan = timespan.Days.ToString((IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(int))).PadLeft(8, '0');
IFormatProvider frmInt32 = (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(int));
// Days that can be represented is more than what can be represented
// Construct a DateTime with the precision to Second as same as the passed DateTime and so get
// the ticks difference so that the microseconds can be calculated
- TimeSpan tsTemp = new TimeSpan(timespan.Days ,timespan.Hours,timespan.Minutes ,timespan.Seconds ,0);
+ TimeSpan tsTemp = new TimeSpan(timespan.Days, timespan.Hours, timespan.Minutes, timespan.Seconds, 0);
long microsec = ((timespan.Ticks-tsTemp.Ticks) * 1000) / System.TimeSpan.TicksPerMillisecond;
// fill the microseconds field
string strMicrosec = microsec.ToString((IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(long)));
if (strMicrosec.Length > 6)
{
- strMicrosec = strMicrosec.Substring(0,6);
+ strMicrosec = strMicrosec.Substring(0, 6);
}
- dmtftimespan = dmtftimespan + strMicrosec.PadLeft(6,'0');
+ dmtftimespan = dmtftimespan + strMicrosec.PadLeft(6, '0');
dmtftimespan = dmtftimespan + ":000";
/// parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch
/// block that handles the inner exception.</param>
/// </summary>
- public ManagementException(string message,Exception innerException):this(innerException, message, null)
+ public ManagementException(string message, Exception innerException):this(innerException, message, null)
{
// if the exception passed is not a ManagementException, then initialize the ErrorCode to Failed
if (!(innerException is ManagementException))
/// </returns>
public ManagementPath CopyTo(ManagementPath path)
{
- return CopyTo(path,(PutOptions)null);
+ return CopyTo(path, (PutOptions)null);
}
/// <summary>
//counterparts afterwards.
IWbemClassObject_DoNotMarshal[] tempArray = new IWbemClassObject_DoNotMarshal[collectionObject.options.BlockSize];
- int status = collectionObject.scope.GetSecuredIEnumWbemClassObjectHandler(enumWbem ).Next_(timeout, (uint)collectionObject.options.BlockSize,tempArray, ref cachedCount);
+ int status = collectionObject.scope.GetSecuredIEnumWbemClassObjectHandler(enumWbem ).Next_(timeout, (uint)collectionObject.options.BlockSize, tempArray, ref cachedCount);
securityHandler.Reset();
context.IdentifierChanged += new IdentifierChangedEventHandler(HandleIdentifierChange);
//the context property has changed so act like we fired the event
- HandleIdentifierChange(this,null);
+ HandleIdentifierChange(this, null);
}
}
string oldValue = Server;
// Only set if changed
- if (0 != string.Compare(oldValue,value,StringComparison.OrdinalIgnoreCase))
+ if (0 != string.Compare(oldValue, value, StringComparison.OrdinalIgnoreCase))
{
if (null == wmiPath)
wmiPath = (IWbemPath)MTAHelper.CreateInMTA(typeof(WbemDefPath));//new WbemDefPath ();
string oldValue = ClassName;
// Only set if changed
- if (0 != string.Compare(oldValue,value,StringComparison.OrdinalIgnoreCase))
+ if (0 != string.Compare(oldValue, value, StringComparison.OrdinalIgnoreCase))
{
// isWbemPathShared handled in internal className property accessor.
internalClassName = value;
{
return true;
}
- return base.CanConvertFrom(context,sourceType);
+ return base.CanConvertFrom(context, sourceType);
}
/// <summary>
{
return true;
}
- return base.CanConvertTo(context,destinationType);
+ return base.CanConvertTo(context, destinationType);
}
/// <summary>
return new InstanceDescriptor(ctor, new object[] {obj.Path});
}
}
- return base.ConvertTo(context,culture,value,destinationType);
+ return base.ConvertTo(context, culture, value, destinationType);
}
}
}
if (p.IsClass && (p.NamespacePath.Length==0))
ClassName = queryOrClassName;
else
- throw new ArgumentException (SR.InvalidQuery,nameof(queryOrClassName));
+ throw new ArgumentException (SR.InvalidQuery, nameof(queryOrClassName));
}
}
// Should start with "select"
if ((q.Length < keyword.Length) ||
(0 != string.Compare (q, 0, keyword, 0, keyword.Length, StringComparison.OrdinalIgnoreCase)))
- throw new ArgumentException (SR.InvalidQuery,"select");
+ throw new ArgumentException (SR.InvalidQuery, "select");
q = q.Remove (0, keyword.Length).TrimStart (null);
// Next should be a '*'
if (0 != q.IndexOf ('*', 0))
- throw new ArgumentException (SR.InvalidQuery,"*");
+ throw new ArgumentException (SR.InvalidQuery, "*");
q = q.Remove (0, 1).TrimStart (null);
if ((q.Length < keyword.Length) ||
(0 != string.Compare (q, 0, keyword, 0, keyword.Length, StringComparison.OrdinalIgnoreCase)))
- throw new ArgumentException (SR.InvalidQuery,"from");
+ throw new ArgumentException (SR.InvalidQuery, "from");
q = q.Remove (0, keyword.Length).TrimStart (null);
if ((q.Length < keyword.Length) ||
(0 != string.Compare (q, 0, keyword, 0, keyword.Length, StringComparison.OrdinalIgnoreCase)))
- throw new ArgumentException (SR.InvalidQuery,"meta_class");
+ throw new ArgumentException (SR.InvalidQuery, "meta_class");
q = q.Remove (0, keyword.Length).TrimStart (null);
if ((q.Length < keyword.Length) ||
(0 != string.Compare (q, 0, keyword, 0, keyword.Length, StringComparison.OrdinalIgnoreCase)))
- throw new ArgumentException (SR.InvalidQuery,"where");
+ throw new ArgumentException (SR.InvalidQuery, "where");
q = q.Remove (0, keyword.Length);
isSchemaQuery = false;
}
else
- throw new ArgumentException (SR.InvalidQuery,nameof(queryOrSourceObject));
+ throw new ArgumentException (SR.InvalidQuery, nameof(queryOrSourceObject));
}
}
}
//Find "associators" clause
if (0 != string.Compare(q, 0, TokenAssociators, 0, TokenAssociators.Length, StringComparison.OrdinalIgnoreCase))
- throw new ArgumentException(SR.InvalidQuery,"associators"); // Invalid query
+ throw new ArgumentException(SR.InvalidQuery, "associators"); // Invalid query
// Strip off the clause
q = q.Remove(0, TokenAssociators.Length);
// Next token should be "of"
if (0 != string.Compare(q, 0, TokenOf, 0, TokenOf.Length, StringComparison.OrdinalIgnoreCase))
- throw new ArgumentException(SR.InvalidQuery,"of"); // Invalid query
+ throw new ArgumentException(SR.InvalidQuery, "of"); // Invalid query
// Strip off the clause and leading WS
q = q.Remove(0, TokenOf.Length).TrimStart (null);
{
// Next should be the "where" clause
if (0 != string.Compare (q, 0, TokenWhere, 0, TokenWhere.Length, StringComparison.OrdinalIgnoreCase))
- throw new ArgumentException(SR.InvalidQuery,"where"); // Invalid query
+ throw new ArgumentException(SR.InvalidQuery, "where"); // Invalid query
q = q.Remove (0, TokenWhere.Length);
isSchemaQuery = false;
}
else
- throw new ArgumentException (SR.InvalidQuery,nameof(queryOrSourceObject));
+ throw new ArgumentException (SR.InvalidQuery, nameof(queryOrSourceObject));
}
}
//Find "references" clause
if (0 != string.Compare(q, 0, TokenReferences, 0, TokenReferences.Length, StringComparison.OrdinalIgnoreCase))
- throw new ArgumentException(SR.InvalidQuery,"references"); // Invalid query
+ throw new ArgumentException(SR.InvalidQuery, "references"); // Invalid query
// Strip off the clause
q = q.Remove(0, TokenReferences.Length);
// Next token should be "of"
if (0 != string.Compare(q, 0, TokenOf, 0, TokenOf.Length, StringComparison.OrdinalIgnoreCase))
- throw new ArgumentException(SR.InvalidQuery,"of"); // Invalid query
+ throw new ArgumentException(SR.InvalidQuery, "of"); // Invalid query
// Strip off the clause and leading WS
q = q.Remove(0, TokenOf.Length).TrimStart (null);
{
// Next should be the "where" clause
if (0 != string.Compare (q, 0, TokenWhere, 0, TokenWhere.Length, StringComparison.OrdinalIgnoreCase))
- throw new ArgumentException(SR.InvalidQuery,"where"); // Invalid query
+ throw new ArgumentException(SR.InvalidQuery, "where"); // Invalid query
q = q.Remove (0, TokenWhere.Length);
EventClassName = queryOrEventClassName;
}
else
- throw new ArgumentException (SR.InvalidQuery,nameof(queryOrEventClassName));
+ throw new ArgumentException (SR.InvalidQuery, nameof(queryOrEventClassName));
}
}
}
q = q.Remove(0, keyword.Length).TrimStart(null);
if (!q.StartsWith("*", StringComparison.Ordinal))
- throw new ArgumentException(SR.InvalidQuery,"*");
+ throw new ArgumentException(SR.InvalidQuery, "*");
q = q.Remove(0, 1).TrimStart(null);
//Find "from" clause
keyword = "from ";
if ((q.Length < keyword.Length) || (0 != string.Compare (q, 0, keyword, 0, keyword.Length, StringComparison.OrdinalIgnoreCase)))
- throw new ArgumentException(SR.InvalidQuery,"from");
+ throw new ArgumentException(SR.InvalidQuery, "from");
ParseToken(ref q, keyword, null, ref bFound, ref eventClassName);
//Find "within" clause
q = q.Remove(0, keyword.Length);
if (q.Length == 0) //bad query
- throw new ArgumentException(SR.InvalidQuery,"having");
+ throw new ArgumentException(SR.InvalidQuery, "having");
havingCondition = q;
}
{
return true;
}
- return base.CanConvertFrom(context,sourceType);
+ return base.CanConvertFrom(context, sourceType);
}
/// <summary>
{
return true;
}
- return base.CanConvertTo(context,destinationType);
+ return base.CanConvertTo(context, destinationType);
}
/// <summary>
return new InstanceDescriptor(ctor, new object[] {obj.QueryString});
}
}
- return base.ConvertTo(context,culture,value,destinationType);
+ return base.ConvertTo(context, culture, value, destinationType);
}
}
}
internal delegate int QualifierSet_EndEnumeration(int vFunc, IntPtr pWbemClassObject);
internal delegate int GetCurrentApartmentType(int vFunc, IntPtr pComThreadingInfo, [Out] out APTTYPE aptType);
internal delegate void VerifyClientKey();
- internal delegate int GetDemultiplexedStub([In,MarshalAs(UnmanagedType.IUnknown)]object pIUnknown, [In]bool isLocal, [Out,MarshalAs(UnmanagedType.IUnknown)]out object ppIUnknown);
+ internal delegate int GetDemultiplexedStub([In, MarshalAs(UnmanagedType.IUnknown)]object pIUnknown, [In]bool isLocal, [Out, MarshalAs(UnmanagedType.IUnknown)]out object ppIUnknown);
internal delegate int CreateInstanceEnumWmi([In][MarshalAs(UnmanagedType.BStr)] string strFilter,
[In] int lFlags,
[In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx,
private void FireIdentifierChanged()
{
if (IdentifierChanged != null)
- IdentifierChanged(this,null);
+ IdentifierChanged(this, null);
}
//Called when IdentifierChanged() event fires
options = ConnectionOptions._Clone((ConnectionOptions)value, new IdentifierChangedEventHandler(HandleIdentifierChange));
//the options property has changed so act like we fired the event
- HandleIdentifierChange(this,null);
+ HandleIdentifierChange(this, null);
}
else
throw new ArgumentNullException (nameof(value));
prvpath = ManagementPath._Clone((ManagementPath)value, new IdentifierChangedEventHandler(HandleIdentifierChange));
//the path property has changed so act like we fired the event
- HandleIdentifierChange(this,null);
+ HandleIdentifierChange(this, null);
}
else
throw new ArgumentNullException (nameof(value));
internal int PutClassAsync_(IWbemClassObjectFreeThreaded pObject, int lFlags, IWbemContext pCtx, IWbemObjectSink pResponseHandler)
{
int status = (int)tag_WBEMSTATUS.WBEM_E_FAILED;
- status = pWbemServiecsSecurityHelper.PutClassAsync_(pObject, lFlags,pCtx, pResponseHandler);
+ status = pWbemServiecsSecurityHelper.PutClassAsync_(pObject, lFlags, pCtx, pResponseHandler);
return status;
}
internal int DeleteClass_( string strClass, int lFlags, IWbemContext pCtx, IntPtr ppCallResult)
internal int DeleteClassAsync_(string strClass, int lFlags, IWbemContext pCtx, IWbemObjectSink pResponseHandler)
{
int status = (int)tag_WBEMSTATUS.WBEM_E_FAILED;
- status = pWbemServiecsSecurityHelper.DeleteClassAsync_(strClass, lFlags, pCtx,pResponseHandler);
+ status = pWbemServiecsSecurityHelper.DeleteClassAsync_(strClass, lFlags, pCtx, pResponseHandler);
return status;
}
internal int CreateClassEnum_(string strSuperClass, int lFlags, IWbemContext pCtx, ref IEnumWbemClassObject ppEnum)
{
return true;
}
- return base.CanConvertFrom(context,sourceType);
+ return base.CanConvertFrom(context, sourceType);
}
/// <summary>
{
return true;
}
- return base.CanConvertTo(context,destinationType);
+ return base.CanConvertTo(context, destinationType);
}
/// <summary>
return new InstanceDescriptor(ctor, new object[] {obj.Path.Path});
}
}
- return base.ConvertTo(context,culture,value,destinationType);
+ return base.ConvertTo(context, culture, value, destinationType);
}
}
}
val = new ulong [length];
for (int i = 0; i < length; i++)
- ((ulong[])val) [i] = Convert.ToUInt64((string)(wmiValueArray.GetValue(i)),(IFormatProvider)CultureInfo.CurrentCulture.GetFormat(typeof(ulong)));
+ ((ulong[])val) [i] = Convert.ToUInt64((string)(wmiValueArray.GetValue(i)), (IFormatProvider)CultureInfo.CurrentCulture.GetFormat(typeof(ulong)));
break;
case CimType.SInt8:
val = new long [length];
for (int i = 0; i < length; i++)
- ((long[])val) [i] = Convert.ToInt64((string)(wmiValueArray.GetValue(i)),(IFormatProvider)CultureInfo.CurrentCulture.GetFormat(typeof(long)));
+ ((long[])val) [i] = Convert.ToInt64((string)(wmiValueArray.GetValue(i)), (IFormatProvider)CultureInfo.CurrentCulture.GetFormat(typeof(long)));
break;
case CimType.Char16:
case CimType.SInt8:
wmiValue = new short [length];
for (int i = 0; i < length; i++)
- ((short[])(wmiValue))[i] = (short)Convert.ToSByte(valArray.GetValue(i),(IFormatProvider)culInfo.GetFormat(typeof(sbyte)));
+ ((short[])(wmiValue))[i] = (short)Convert.ToSByte(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(sbyte)));
break;
case CimType.UInt8:
{
wmiValue = new byte [length];
for (int i = 0; i < length; i++)
- ((byte[])wmiValue)[i] = Convert.ToByte(valArray.GetValue(i),(IFormatProvider)culInfo.GetFormat(typeof(byte)));
+ ((byte[])wmiValue)[i] = Convert.ToByte(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(byte)));
}
break;
{
wmiValue = new short [length];
for (int i = 0; i < length; i++)
- ((short[])(wmiValue))[i] = Convert.ToInt16(valArray.GetValue(i),(IFormatProvider)culInfo.GetFormat(typeof(short)));
+ ((short[])(wmiValue))[i] = Convert.ToInt16(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(short)));
}
break;
case CimType.UInt16:
wmiValue = new int [length];
for (int i = 0; i < length; i++)
- ((int[])(wmiValue))[i] = (int)(Convert.ToUInt16(valArray.GetValue(i),(IFormatProvider)culInfo.GetFormat(typeof(ushort))));
+ ((int[])(wmiValue))[i] = (int)(Convert.ToUInt16(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(ushort))));
break;
case CimType.SInt32:
{
wmiValue = new int [length];
for (int i = 0; i < length; i++)
- ((int[])(wmiValue))[i] = Convert.ToInt32(valArray.GetValue(i),(IFormatProvider)culInfo.GetFormat(typeof(int)));
+ ((int[])(wmiValue))[i] = Convert.ToInt32(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(int)));
}
break;
case CimType.UInt32:
wmiValue = new int [length];
for (int i = 0; i < length; i++)
- ((int[])(wmiValue))[i] = (int)(Convert.ToUInt32(valArray.GetValue(i),(IFormatProvider)culInfo.GetFormat(typeof(uint))));
+ ((int[])(wmiValue))[i] = (int)(Convert.ToUInt32(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(uint))));
break;
case CimType.SInt64:
wmiValue = new string [length];
for (int i = 0; i < length; i++)
- ((string[])(wmiValue))[i] = (Convert.ToInt64(valArray.GetValue(i),(IFormatProvider)culInfo.GetFormat(typeof(long)))).ToString((IFormatProvider)culInfo.GetFormat(typeof(long)));
+ ((string[])(wmiValue))[i] = (Convert.ToInt64(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(long)))).ToString((IFormatProvider)culInfo.GetFormat(typeof(long)));
break;
case CimType.UInt64:
wmiValue = new string [length];
for (int i = 0; i < length; i++)
- ((string[])(wmiValue))[i] = (Convert.ToUInt64(valArray.GetValue(i),(IFormatProvider)culInfo.GetFormat(typeof(ulong)))).ToString((IFormatProvider)culInfo.GetFormat(typeof(ulong)));
+ ((string[])(wmiValue))[i] = (Convert.ToUInt64(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(ulong)))).ToString((IFormatProvider)culInfo.GetFormat(typeof(ulong)));
break;
case CimType.Real32:
{
wmiValue = new float [length];
for (int i = 0; i < length; i++)
- ((float[])(wmiValue))[i] = Convert.ToSingle(valArray.GetValue(i),(IFormatProvider)culInfo.GetFormat(typeof(float)));
+ ((float[])(wmiValue))[i] = Convert.ToSingle(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(float)));
}
break;
{
wmiValue = new double [length];
for (int i = 0; i < length; i++)
- ((double[])(wmiValue))[i] = Convert.ToDouble(valArray.GetValue(i),(IFormatProvider)culInfo.GetFormat(typeof(double)));
+ ((double[])(wmiValue))[i] = Convert.ToDouble(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(double)));
}
break;
case CimType.Char16:
wmiValue = new short [length];
for (int i = 0; i < length; i++)
- ((short[])(wmiValue))[i] = (short)Convert.ToChar(valArray.GetValue(i),(IFormatProvider)culInfo.GetFormat(typeof(char)));
+ ((short[])(wmiValue))[i] = (short)Convert.ToChar(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(char)));
break;
case CimType.String:
{
wmiValue = new bool [length];
for (int i = 0; i < length; i++)
- ((bool[])(wmiValue))[i] = Convert.ToBoolean(valArray.GetValue(i),(IFormatProvider)culInfo.GetFormat(typeof(bool)));
+ ((bool[])(wmiValue))[i] = Convert.ToBoolean(valArray.GetValue(i), (IFormatProvider)culInfo.GetFormat(typeof(bool)));
}
break;
switch (type)
{
case CimType.SInt8:
- wmiValue = (short)Convert.ToSByte(val,(IFormatProvider)culInfo.GetFormat(typeof(short)));
+ wmiValue = (short)Convert.ToSByte(val, (IFormatProvider)culInfo.GetFormat(typeof(short)));
break;
case CimType.UInt8:
- wmiValue = Convert.ToByte(val,(IFormatProvider)culInfo.GetFormat(typeof(byte)));
+ wmiValue = Convert.ToByte(val, (IFormatProvider)culInfo.GetFormat(typeof(byte)));
break;
case CimType.SInt16:
- wmiValue = Convert.ToInt16(val,(IFormatProvider)culInfo.GetFormat(typeof(short)));
+ wmiValue = Convert.ToInt16(val, (IFormatProvider)culInfo.GetFormat(typeof(short)));
break;
case CimType.UInt16:
- wmiValue = (int)(Convert.ToUInt16(val,(IFormatProvider)culInfo.GetFormat(typeof(ushort))));
+ wmiValue = (int)(Convert.ToUInt16(val, (IFormatProvider)culInfo.GetFormat(typeof(ushort))));
break;
case CimType.SInt32:
- wmiValue = Convert.ToInt32(val,(IFormatProvider)culInfo.GetFormat(typeof(int)));
+ wmiValue = Convert.ToInt32(val, (IFormatProvider)culInfo.GetFormat(typeof(int)));
break;
case CimType.UInt32:
- wmiValue = (int)Convert.ToUInt32(val,(IFormatProvider)culInfo.GetFormat(typeof(uint)));
+ wmiValue = (int)Convert.ToUInt32(val, (IFormatProvider)culInfo.GetFormat(typeof(uint)));
break;
case CimType.SInt64:
- wmiValue = (Convert.ToInt64(val,(IFormatProvider)culInfo.GetFormat(typeof(long)))).ToString((IFormatProvider)culInfo.GetFormat(typeof(long)));
+ wmiValue = (Convert.ToInt64(val, (IFormatProvider)culInfo.GetFormat(typeof(long)))).ToString((IFormatProvider)culInfo.GetFormat(typeof(long)));
break;
case CimType.UInt64:
- wmiValue = (Convert.ToUInt64(val,(IFormatProvider)culInfo.GetFormat(typeof(ulong)))).ToString((IFormatProvider)culInfo.GetFormat(typeof(ulong)));
+ wmiValue = (Convert.ToUInt64(val, (IFormatProvider)culInfo.GetFormat(typeof(ulong)))).ToString((IFormatProvider)culInfo.GetFormat(typeof(ulong)));
break;
case CimType.Real32:
- wmiValue = Convert.ToSingle(val,(IFormatProvider)culInfo.GetFormat(typeof(float)));
+ wmiValue = Convert.ToSingle(val, (IFormatProvider)culInfo.GetFormat(typeof(float)));
break;
case CimType.Real64:
- wmiValue = Convert.ToDouble(val,(IFormatProvider)culInfo.GetFormat(typeof(double)));
+ wmiValue = Convert.ToDouble(val, (IFormatProvider)culInfo.GetFormat(typeof(double)));
break;
case CimType.Char16:
- wmiValue = (short)Convert.ToChar(val,(IFormatProvider)culInfo.GetFormat(typeof(char)));
+ wmiValue = (short)Convert.ToChar(val, (IFormatProvider)culInfo.GetFormat(typeof(char)));
break;
case CimType.String:
break;
case CimType.Boolean:
- wmiValue = Convert.ToBoolean(val,(IFormatProvider)culInfo.GetFormat(typeof(bool)));
+ wmiValue = Convert.ToBoolean(val, (IFormatProvider)culInfo.GetFormat(typeof(bool)));
break;
case CimType.Object:
{
type = CimType.UInt32;
if (((uint)val & 0x80000000) != 0)
- wmiValue = Convert.ToString(val,(IFormatProvider)culInfo.GetFormat(typeof(uint)));
+ wmiValue = Convert.ToString(val, (IFormatProvider)culInfo.GetFormat(typeof(uint)));
else
- wmiValue = Convert.ToInt32(val,(IFormatProvider)culInfo.GetFormat(typeof(int)));
+ wmiValue = Convert.ToInt32(val, (IFormatProvider)culInfo.GetFormat(typeof(int)));
}
else if (valueType == typeof(ulong))
{
if (status >= 0)
{
if ((index + nameArray.Length) > array.Length)
- throw new ArgumentException(null,nameof(index));
+ throw new ArgumentException(null, nameof(index));
foreach (string propertyName in nameArray)
array.SetValue(new PropertyData(parent, propertyName), index++);
{
wmiValue = new int [length];
for (int i = 0; i < length; i++)
- ((int[])(wmiValue))[i] = Convert.ToInt32(valArray.GetValue(i),(IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(int)));
+ ((int[])(wmiValue))[i] = Convert.ToInt32(valArray.GetValue(i), (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(int)));
}
else if (elementType == typeof(double))
{
wmiValue = new double [length];
for (int i = 0; i < length; i++)
- ((double[])(wmiValue))[i] = Convert.ToDouble(valArray.GetValue(i),(IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(double)));
+ ((double[])(wmiValue))[i] = Convert.ToDouble(valArray.GetValue(i), (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(double)));
}
else if (elementType == typeof(string))
{
{
wmiValue = new bool [length];
for (int i = 0; i < length; i++)
- ((bool[])(wmiValue))[i] = Convert.ToBoolean(valArray.GetValue(i),(IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(bool)));
+ ((bool[])(wmiValue))[i] = Convert.ToBoolean(valArray.GetValue(i), (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(bool)));
}
else
wmiValue = valArray; //should this throw ?
/// the ManagementSystemProperties class is included in the generated class definition.
/// This parameter is ignored if systemPropertyClass is <see langword="true"/>.</para>
/// </remarks>
- public CodeTypeDeclaration GenerateCode(bool includeSystemProperties ,bool systemPropertyClass)
+ public CodeTypeDeclaration GenerateCode(bool includeSystemProperties, bool systemPropertyClass)
{
CodeTypeDeclaration retType;
/// <param name="lang">The language to generate in.</param>
/// <param name="filePath">The path to the file where the generated code should be stored.</param>
/// <param name="netNamespace">The .NET namespace into which the class is generated.</param>
- public bool GenerateCode(CodeLanguage lang ,string filePath,string netNamespace)
+ public bool GenerateCode(CodeLanguage lang, string filePath, string netNamespace)
{
// check for proper arguments
if (filePath == null )
InitializeCodeGeneration();
//Now create the filestream (output file)
- tw = new StreamWriter(new FileStream (filePath,FileMode.Create),System.Text.Encoding.UTF8);
+ tw = new StreamWriter(new FileStream (filePath, FileMode.Create), System.Text.Encoding.UTF8);
return GenerateAndWriteCode(lang);
// return (<defNamespace>);
// }
//}
- GeneratePublicReadOnlyProperty(PublicNamesUsed["NamespaceProperty"].ToString(),"System.String",
- OriginalNamespace,false,true,SR.CommentOriginNamespace);
+ GeneratePublicReadOnlyProperty(PublicNamesUsed["NamespaceProperty"].ToString(), "System.String",
+ OriginalNamespace, false, true, SR.CommentOriginNamespace);
/*
Generate the following code for className
// Add a private member variable to hold the namespace of the created class
// Generate a private member variable for storing the generated class Name
- GeneratePrivateMember(PrivateNamesUsed["CreationWmiNamespace"].ToString(),"System.String",
- new CodePrimitiveExpression(OriginalNamespace),true,SR.CommentCreatedWmiNamespace);
+ GeneratePrivateMember(PrivateNamesUsed["CreationWmiNamespace"].ToString(), "System.String",
+ new CodePrimitiveExpression(OriginalNamespace), true, SR.CommentCreatedWmiNamespace);
GenerateClassNameProperty();
// Generate a private member variable for storing the generated class Name
- GeneratePrivateMember(PrivateNamesUsed["CreationClassName"].ToString(),"System.String",
- new CodePrimitiveExpression(OriginalClassName),true,SR.CommentCreatedClass);
+ GeneratePrivateMember(PrivateNamesUsed["CreationClassName"].ToString(), "System.String",
+ new CodePrimitiveExpression(OriginalClassName), true, SR.CommentCreatedClass);
//public SystemPropertiesClass _SystemProps{
// get {
// return (privSysProps);
// }
//}
- GeneratePublicReadOnlyProperty(PublicNamesUsed["SystemPropertiesProperty"].ToString(),PublicNamesUsed["SystemPropertiesClass"].ToString(),
- PrivateNamesUsed["SystemPropertiesObject"].ToString(),true,true,
+ GeneratePublicReadOnlyProperty(PublicNamesUsed["SystemPropertiesProperty"].ToString(), PublicNamesUsed["SystemPropertiesClass"].ToString(),
+ PrivateNamesUsed["SystemPropertiesObject"].ToString(), true, true,
SR.CommentSystemObject);
//public wmiObjectClass _Object{
// return (privWmiObject);
// }
//}
- GeneratePublicReadOnlyProperty(PublicNamesUsed["LateBoundObjectProperty"].ToString(),PublicNamesUsed["BaseObjClass"].ToString(),
- PrivateNamesUsed["CurrentObject"].ToString(),true,false,
+ GeneratePublicReadOnlyProperty(PublicNamesUsed["LateBoundObjectProperty"].ToString(), PublicNamesUsed["BaseObjClass"].ToString(),
+ PrivateNamesUsed["CurrentObject"].ToString(), true, false,
SR.CommentLateBoundProperty);
//public ManagementScope Scope {
// }
//}
- GeneratePublicProperty(PublicNamesUsed["AutoCommitProperty"].ToString(),"System.Boolean",
- new CodeSnippetExpression(PrivateNamesUsed["AutoCommitProperty"].ToString()),false,
- SR.CommentAutoCommitProperty,false);
+ GeneratePublicProperty(PublicNamesUsed["AutoCommitProperty"].ToString(), "System.Boolean",
+ new CodeSnippetExpression(PrivateNamesUsed["AutoCommitProperty"].ToString()), false,
+ SR.CommentAutoCommitProperty, false);
//public ManagementPath Path {
// get {
GeneratePathProperty();
// Adding a private member for storing the ManagementScope to be used by various static methods
- GeneratePrivateMember(PrivateNamesUsed["statMgmtScope"].ToString(),PublicNamesUsed["ScopeClass"].ToString(),
- new CodePrimitiveExpression(null),true,SR.CommentStaticManagementScope);
+ GeneratePrivateMember(PrivateNamesUsed["statMgmtScope"].ToString(), PublicNamesUsed["ScopeClass"].ToString(),
+ new CodePrimitiveExpression(null), true, SR.CommentStaticManagementScope);
// Generate a property "StaticScope" to set and get the static ManagementScope for the class
- GeneratePublicProperty(PrivateNamesUsed["staticScope"].ToString(),PublicNamesUsed["ScopeClass"].ToString(),
- new CodeVariableReferenceExpression(PrivateNamesUsed["statMgmtScope"].ToString()),true, SR.CommentStaticScopeProperty,true);
+ GeneratePublicProperty(PrivateNamesUsed["staticScope"].ToString(), PublicNamesUsed["ScopeClass"].ToString(),
+ new CodeVariableReferenceExpression(PrivateNamesUsed["statMgmtScope"].ToString()), true, SR.CommentStaticScopeProperty, true);
// Generate a function to check if a given class can be represented
// by the generated class
//Now declare the private class variables
//private Wmi_SystemProps SystemProps
- GeneratePrivateMember(PrivateNamesUsed["SystemPropertiesObject"].ToString(),PublicNamesUsed["SystemPropertiesClass"].ToString(),null);
+ GeneratePrivateMember(PrivateNamesUsed["SystemPropertiesObject"].ToString(), PublicNamesUsed["SystemPropertiesClass"].ToString(), null);
//private WmiObject privObject
- GeneratePrivateMember(PrivateNamesUsed["LateBoundObject"].ToString(),PublicNamesUsed["LateBoundClass"].ToString(),SR.CommentLateBoundObject);
+ GeneratePrivateMember(PrivateNamesUsed["LateBoundObject"].ToString(), PublicNamesUsed["LateBoundClass"].ToString(), SR.CommentLateBoundObject);
//private Internal AutoCommitProperty
- GeneratePrivateMember(PrivateNamesUsed["AutoCommitProperty"].ToString(),"System.Boolean" ,new CodePrimitiveExpression(true),false,SR.CommentPrivateAutoCommit);
+ GeneratePrivateMember(PrivateNamesUsed["AutoCommitProperty"].ToString(), "System.Boolean", new CodePrimitiveExpression(true), false, SR.CommentPrivateAutoCommit);
//private WmiObject Embedded object
- GeneratePrivateMember(PrivateNamesUsed["EmbeddedObject"].ToString(),PublicNamesUsed["BaseObjClass"].ToString(),SR.CommentEmbeddedObject);
+ GeneratePrivateMember(PrivateNamesUsed["EmbeddedObject"].ToString(), PublicNamesUsed["BaseObjClass"].ToString(), SR.CommentEmbeddedObject);
//private WmiObject for current object used
- GeneratePrivateMember(PrivateNamesUsed["CurrentObject"].ToString(),PublicNamesUsed["BaseObjClass"].ToString(),SR.CommentCurrentObject);
+ GeneratePrivateMember(PrivateNamesUsed["CurrentObject"].ToString(), PublicNamesUsed["BaseObjClass"].ToString(), SR.CommentCurrentObject);
//private WmiObject for current object used
- GeneratePrivateMember(PrivateNamesUsed["IsEmbedded"].ToString(),"System.Boolean",new CodePrimitiveExpression(false),false,SR.CommentFlagForEmbedded);
+ GeneratePrivateMember(PrivateNamesUsed["IsEmbedded"].ToString(), "System.Boolean", new CodePrimitiveExpression(false), false, SR.CommentFlagForEmbedded);
//Now generate the Type Converter class also
cc.Members.Add(GenerateTypeConverterClass());
bSingletonClass = false;
foreach (QualifierData q in classobj.Qualifiers)
{
- if (string.Equals(q.Name,"singleton",StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(q.Name, "singleton", StringComparison.OrdinalIgnoreCase))
{
//This is a singleton class
bSingletonClass = true;
private void InitilializePublicPrivateMembers()
{
//Initialize the public members
- PublicNamesUsed.Add("SystemPropertiesProperty","SystemProperties");
- PublicNamesUsed.Add("LateBoundObjectProperty","LateBoundObject");
- PublicNamesUsed.Add("NamespaceProperty","OriginatingNamespace");
- PublicNamesUsed.Add("ClassNameProperty","ManagementClassName");
- PublicNamesUsed.Add("ScopeProperty","Scope");
- PublicNamesUsed.Add("PathProperty","Path");
- PublicNamesUsed.Add("SystemPropertiesClass","ManagementSystemProperties");
- PublicNamesUsed.Add("LateBoundClass","System.Management.ManagementObject");
- PublicNamesUsed.Add("PathClass","System.Management.ManagementPath");
- PublicNamesUsed.Add("ScopeClass","System.Management.ManagementScope");
- PublicNamesUsed.Add("QueryOptionsClass","System.Management.EnumerationOptions");
- PublicNamesUsed.Add("GetOptionsClass","System.Management.ObjectGetOptions");
- PublicNamesUsed.Add("ArgumentExceptionClass","System.ArgumentException");
- PublicNamesUsed.Add("QueryClass","SelectQuery");
- PublicNamesUsed.Add("ObjectSearcherClass","System.Management.ManagementObjectSearcher");
- PublicNamesUsed.Add("FilterFunction","GetInstances");
- PublicNamesUsed.Add("ConstructPathFunction","ConstructPath");
- PublicNamesUsed.Add("TypeConverter","TypeConverter");
- PublicNamesUsed.Add("AutoCommitProperty","AutoCommit");
- PublicNamesUsed.Add("CommitMethod","CommitObject");
- PublicNamesUsed.Add("ManagementClass","System.Management.ManagementClass");
- PublicNamesUsed.Add("NotSupportedExceptClass","System.NotSupportedException");
- PublicNamesUsed.Add("BaseObjClass","System.Management.ManagementBaseObject");
- PublicNamesUsed.Add("OptionsProp","Options");
- PublicNamesUsed.Add("ClassPathProperty","ClassPath");
- PublicNamesUsed.Add("CreateInst","CreateInstance");
- PublicNamesUsed.Add("DeleteInst","Delete");
+ PublicNamesUsed.Add("SystemPropertiesProperty", "SystemProperties");
+ PublicNamesUsed.Add("LateBoundObjectProperty", "LateBoundObject");
+ PublicNamesUsed.Add("NamespaceProperty", "OriginatingNamespace");
+ PublicNamesUsed.Add("ClassNameProperty", "ManagementClassName");
+ PublicNamesUsed.Add("ScopeProperty", "Scope");
+ PublicNamesUsed.Add("PathProperty", "Path");
+ PublicNamesUsed.Add("SystemPropertiesClass", "ManagementSystemProperties");
+ PublicNamesUsed.Add("LateBoundClass", "System.Management.ManagementObject");
+ PublicNamesUsed.Add("PathClass", "System.Management.ManagementPath");
+ PublicNamesUsed.Add("ScopeClass", "System.Management.ManagementScope");
+ PublicNamesUsed.Add("QueryOptionsClass", "System.Management.EnumerationOptions");
+ PublicNamesUsed.Add("GetOptionsClass", "System.Management.ObjectGetOptions");
+ PublicNamesUsed.Add("ArgumentExceptionClass", "System.ArgumentException");
+ PublicNamesUsed.Add("QueryClass", "SelectQuery");
+ PublicNamesUsed.Add("ObjectSearcherClass", "System.Management.ManagementObjectSearcher");
+ PublicNamesUsed.Add("FilterFunction", "GetInstances");
+ PublicNamesUsed.Add("ConstructPathFunction", "ConstructPath");
+ PublicNamesUsed.Add("TypeConverter", "TypeConverter");
+ PublicNamesUsed.Add("AutoCommitProperty", "AutoCommit");
+ PublicNamesUsed.Add("CommitMethod", "CommitObject");
+ PublicNamesUsed.Add("ManagementClass", "System.Management.ManagementClass");
+ PublicNamesUsed.Add("NotSupportedExceptClass", "System.NotSupportedException");
+ PublicNamesUsed.Add("BaseObjClass", "System.Management.ManagementBaseObject");
+ PublicNamesUsed.Add("OptionsProp", "Options");
+ PublicNamesUsed.Add("ClassPathProperty", "ClassPath");
+ PublicNamesUsed.Add("CreateInst", "CreateInstance");
+ PublicNamesUsed.Add("DeleteInst", "Delete");
// Adding this so that the namespace resolving routine does not name
// any properties with the name "System"
- PublicNamesUsed.Add("SystemNameSpace","System");
- PublicNamesUsed.Add("ArgumentOutOfRangeException","System.ArgumentOutOfRangeException");
- PublicNamesUsed.Add("System","System");
- PublicNamesUsed.Add("Other","Other");
- PublicNamesUsed.Add("Unknown","Unknown");
- PublicNamesUsed.Add("PutOptions","System.Management.PutOptions");
- PublicNamesUsed.Add("Type","System.Type");
- PublicNamesUsed.Add("Boolean","System.Boolean");
+ PublicNamesUsed.Add("SystemNameSpace", "System");
+ PublicNamesUsed.Add("ArgumentOutOfRangeException", "System.ArgumentOutOfRangeException");
+ PublicNamesUsed.Add("System", "System");
+ PublicNamesUsed.Add("Other", "Other");
+ PublicNamesUsed.Add("Unknown", "Unknown");
+ PublicNamesUsed.Add("PutOptions", "System.Management.PutOptions");
+ PublicNamesUsed.Add("Type", "System.Type");
+ PublicNamesUsed.Add("Boolean", "System.Boolean");
PublicNamesUsed.Add("ValueType", "System.ValueType");
PublicNamesUsed.Add("Events1", "Events");
PublicNamesUsed.Add("Component1", "Component");
//Initialize the Private Members
- PrivateNamesUsed.Add("SystemPropertiesObject","PrivateSystemProperties");
- PrivateNamesUsed.Add("LateBoundObject","PrivateLateBoundObject");
- PrivateNamesUsed.Add("AutoCommitProperty","AutoCommitProp");
- PrivateNamesUsed.Add("Privileges","EnablePrivileges");
- PrivateNamesUsed.Add("ComponentClass","System.ComponentModel.Component");
- PrivateNamesUsed.Add("ScopeParam","mgmtScope");
- PrivateNamesUsed.Add("NullRefExcep","System.NullReferenceException");
- PrivateNamesUsed.Add("ConverterClass","WMIValueTypeConverter");
- PrivateNamesUsed.Add("EnumParam","enumOptions");
- PrivateNamesUsed.Add("CreationClassName" , "CreatedClassName");
- PrivateNamesUsed.Add("CreationWmiNamespace" , "CreatedWmiNamespace");
- PrivateNamesUsed.Add("ClassNameCheckFunc","CheckIfProperClass");
- PrivateNamesUsed.Add("EmbeddedObject","embeddedObj");
- PrivateNamesUsed.Add("CurrentObject","curObj");
- PrivateNamesUsed.Add("IsEmbedded","isEmbedded");
- PrivateNamesUsed.Add("ToDateTimeMethod","ToDateTime");
- PrivateNamesUsed.Add("ToDMTFDateTimeMethod" , "ToDmtfDateTime");
- PrivateNamesUsed.Add("ToDMTFTimeIntervalMethod" , "ToDmtfTimeInterval");
- PrivateNamesUsed.Add("ToTimeSpanMethod" , "ToTimeSpan");
- PrivateNamesUsed.Add("SetMgmtScope" , "SetStaticManagementScope");
- PrivateNamesUsed.Add("statMgmtScope" , "statMgmtScope");
- PrivateNamesUsed.Add("staticScope" , "StaticScope");
+ PrivateNamesUsed.Add("SystemPropertiesObject", "PrivateSystemProperties");
+ PrivateNamesUsed.Add("LateBoundObject", "PrivateLateBoundObject");
+ PrivateNamesUsed.Add("AutoCommitProperty", "AutoCommitProp");
+ PrivateNamesUsed.Add("Privileges", "EnablePrivileges");
+ PrivateNamesUsed.Add("ComponentClass", "System.ComponentModel.Component");
+ PrivateNamesUsed.Add("ScopeParam", "mgmtScope");
+ PrivateNamesUsed.Add("NullRefExcep", "System.NullReferenceException");
+ PrivateNamesUsed.Add("ConverterClass", "WMIValueTypeConverter");
+ PrivateNamesUsed.Add("EnumParam", "enumOptions");
+ PrivateNamesUsed.Add("CreationClassName", "CreatedClassName");
+ PrivateNamesUsed.Add("CreationWmiNamespace", "CreatedWmiNamespace");
+ PrivateNamesUsed.Add("ClassNameCheckFunc", "CheckIfProperClass");
+ PrivateNamesUsed.Add("EmbeddedObject", "embeddedObj");
+ PrivateNamesUsed.Add("CurrentObject", "curObj");
+ PrivateNamesUsed.Add("IsEmbedded", "isEmbedded");
+ PrivateNamesUsed.Add("ToDateTimeMethod", "ToDateTime");
+ PrivateNamesUsed.Add("ToDMTFDateTimeMethod", "ToDmtfDateTime");
+ PrivateNamesUsed.Add("ToDMTFTimeIntervalMethod", "ToDmtfTimeInterval");
+ PrivateNamesUsed.Add("ToTimeSpanMethod", "ToTimeSpan");
+ PrivateNamesUsed.Add("SetMgmtScope", "SetStaticManagementScope");
+ PrivateNamesUsed.Add("statMgmtScope", "statMgmtScope");
+ PrivateNamesUsed.Add("staticScope", "StaticScope");
PrivateNamesUsed.Add("initVariable", "Initialize");
PrivateNamesUsed.Add("putOptions", "putOptions");
- PrivateNamesUsed.Add("InitialObjectFunc" , "InitializeObject");
+ PrivateNamesUsed.Add("InitialObjectFunc", "InitializeObject");
}
{
foreach (PropertyData prop in classobj.Properties)
{
- PublicProperties.Add(prop.Name,prop.Name);
+ PublicProperties.Add(prop.Name, prop.Name);
}
}
{
foreach (MethodData meth in classobj.Methods)
{
- PublicMethods.Add(meth.Name,meth.Name);
+ PublicMethods.Add(meth.Name, meth.Name);
}
}
//We will check each public names with the property names here.
foreach (string s in PublicNamesUsed.Values)
{
- nIndex = IsContainedIn(s,ref PublicProperties);
+ nIndex = IsContainedIn(s, ref PublicProperties);
if ( nIndex != -1)
{
//We had found a collision with a public property
//So we will resolve the collision by changing the property name
//and continue
- PublicProperties.SetByIndex(nIndex,ResolveCollision(s,false));
+ PublicProperties.SetByIndex(nIndex, ResolveCollision(s, false));
continue;
}
- nIndex = IsContainedIn(s,ref PublicMethods);
+ nIndex = IsContainedIn(s, ref PublicMethods);
if (nIndex != -1)
{
//We had found a collision with a public method
//So we will resolve the collision by changing the method name
//and continue
- PublicMethods.SetByIndex(nIndex,ResolveCollision(s,false));
+ PublicMethods.SetByIndex(nIndex, ResolveCollision(s, false));
continue;
}
}
//Now we will check for collision against private variables
foreach (string s in PublicProperties.Values)
{
- nIndex = IsContainedIn(s,ref PrivateNamesUsed);
+ nIndex = IsContainedIn(s, ref PrivateNamesUsed);
if (nIndex != -1)
{
//We had found a collision with a public property
//So we will resolve the collision by changing the private name
//and continue
- PrivateNamesUsed.SetByIndex(nIndex,ResolveCollision(s,false));
+ PrivateNamesUsed.SetByIndex(nIndex, ResolveCollision(s, false));
}
}
foreach (string s in PublicMethods.Values)
{
- nIndex = IsContainedIn(s,ref PrivateNamesUsed);
+ nIndex = IsContainedIn(s, ref PrivateNamesUsed);
if (nIndex != -1)
{
//We had found a collision with a public method
//So we will resolve the collision by changing the private name
//and continue
- PrivateNamesUsed.SetByIndex(nIndex,ResolveCollision(s,false));
+ PrivateNamesUsed.SetByIndex(nIndex, ResolveCollision(s, false));
}
}
//Now we will check for collision against Methods and Public Properties
foreach (string s in PublicProperties.Values)
{
- nIndex = IsContainedIn(s,ref PublicMethods);
+ nIndex = IsContainedIn(s, ref PublicMethods);
if (nIndex != -1)
{
//We had found a collision with a public property
//So we will resolve the collision by changing the Public Property name
//and continue
- PublicMethods.SetByIndex(nIndex,ResolveCollision(s,false));
+ PublicMethods.SetByIndex(nIndex, ResolveCollision(s, false));
}
}
//Now we will create the CollectionClass and Enumerator Class names as they are dependent on the
//generated class name and the generated class name might have changed due to collision
string strTemp = PrivateNamesUsed["GeneratedClassName"].ToString()+"Collection";
- PrivateNamesUsed.Add("CollectionClass",ResolveCollision(strTemp,true));
+ PrivateNamesUsed.Add("CollectionClass", ResolveCollision(strTemp, true));
strTemp = PrivateNamesUsed["GeneratedClassName"].ToString()+"Enumerator";
- PrivateNamesUsed.Add("EnumeratorClass",ResolveCollision(strTemp,true));
+ PrivateNamesUsed.Add("EnumeratorClass", ResolveCollision(strTemp, true));
}
/// <summary>
/// </summary>
/// <param name="inString"> </param>
/// <param name="bCheckthisFirst"></param>
- private string ResolveCollision(string inString,bool bCheckthisFirst)
+ private string ResolveCollision(string inString, bool bCheckthisFirst)
{
string strTemp = inString;
bool bCollision = true;
while (bCollision == true)
{
- if (IsContainedIn(strTemp,ref PublicProperties) == -1)
+ if (IsContainedIn(strTemp, ref PublicProperties) == -1)
{
- if (IsContainedIn(strTemp,ref PublicMethods) == -1)
+ if (IsContainedIn(strTemp, ref PublicMethods) == -1)
{
- if (IsContainedIn(strTemp,ref PublicNamesUsed) == -1)
+ if (IsContainedIn(strTemp, ref PublicNamesUsed) == -1)
{
- if (IsContainedIn(strTemp,ref PrivateNamesUsed) == -1)
+ if (IsContainedIn(strTemp, ref PrivateNamesUsed) == -1)
{
//So this is not colliding with anything.
bCollision = false;
if (strTemp.Length > 0)
{
- string strFirstChar = strTemp.Substring(0,1).ToUpper(CultureInfo.InvariantCulture);
- strTemp = strFirstChar + strTemp.Substring(1,strTemp.Length -1);
+ string strFirstChar = strTemp.Substring(0, 1).ToUpper(CultureInfo.InvariantCulture);
+ strTemp = strFirstChar + strTemp.Substring(1, strTemp.Length -1);
}
return strTemp;
if (NETNamespace.Length == 0)
{
strNs = OriginalNamespace;
- strNs = strNs.Replace ('\\','.');
+ strNs = strNs.Replace ('\\', '.');
strNs = strNs.ToUpper(CultureInfo.InvariantCulture);
}
else
if (OriginalClassName.IndexOf('_') > 0)
{
- strClass = OriginalClassName.Substring(0,OriginalClassName.IndexOf('_'));
+ strClass = OriginalClassName.Substring(0, OriginalClassName.IndexOf('_'));
// if Namespace is not alread set then construct the namespace
if (NETNamespace.Length == 0)
{
Type.GetType("System.Collections." + strClass) != null ||
Type.GetType("System.Globalization." + strClass) != null )
{
- PublicNamesUsed.Add(strClass,strClass);
- strClass = ResolveCollision(strClass,true);
+ PublicNamesUsed.Add(strClass, strClass);
+ strClass = ResolveCollision(strClass, true);
}
PrivateNamesUsed.Add ("GeneratedClassName", strClass);
- PrivateNamesUsed.Add("GeneratedNamespace",strNs);
+ PrivateNamesUsed.Add("GeneratedNamespace", strNs);
}
/// <param name="isLiteral"></param>
/// <param name="isBrowsable"></param>
/// <param name="Comment"></param>
- private void GeneratePublicReadOnlyProperty(string propName, string propType, object propValue,bool isLiteral,bool isBrowsable,string Comment)
+ private void GeneratePublicReadOnlyProperty(string propName, string propType, object propValue, bool isLiteral, bool isBrowsable, string Comment)
{
cmp = new CodeMemberProperty ();
cmp.Name = propName;
cmp.CustomAttributes.Add(cad);
caa = new CodeAttributeArgument();
- caa.Value = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DesignerSerializationVisibility"),"Hidden");
+ caa.Value = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DesignerSerializationVisibility"), "Hidden");
cad = new CodeAttributeDeclaration();
cad.Name = "DesignerSerializationVisibility";
cad.Arguments.Add(caa);
}
}
- private void GeneratePublicProperty(string propName,string propType, CodeExpression Value,bool isBrowsable,string Comment,bool isStatic)
+ private void GeneratePublicProperty(string propName, string propType, CodeExpression Value, bool isBrowsable, string Comment, bool isStatic)
{
cmp = new CodeMemberProperty();
cmp.Name = propName;
if (IsDesignerSerializationVisibilityToBeSet(propName))
{
caa = new CodeAttributeArgument();
- caa.Value = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DesignerSerializationVisibility"),"Hidden");
+ caa.Value = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DesignerSerializationVisibility"), "Hidden");
cad = new CodeAttributeDeclaration();
cad.Name = "DesignerSerializationVisibility";
cad.Arguments.Add(caa);
cpde.Type = new CodeTypeReference(PublicNamesUsed["BaseObjClass"].ToString());
cpde.Name = "ManagedObject";
cctor.Parameters.Add(cpde);
- cctor.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(PrivateNamesUsed["LateBoundObject"].ToString()),new CodeVariableReferenceExpression("ManagedObject")));
+ cctor.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(PrivateNamesUsed["LateBoundObject"].ToString()), new CodeVariableReferenceExpression("ManagedObject")));
SysPropsClass.Members.Add(cctor);
caa = new CodeAttributeArgument();
cmp.Name = (new string(strPropName)).ToUpper(CultureInfo.InvariantCulture);
cmp.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- cmp.Type = ConvertCIMType(prop.Type,prop.IsArray);
+ cmp.Type = ConvertCIMType(prop.Type, prop.IsArray);
cie = new CodeIndexerExpression(
new CodeVariableReferenceExpression(PrivateNamesUsed["LateBoundObject"].ToString()),
new CodeExpression[] {new CodePrimitiveExpression(prop.Name)});
- cmp.GetStatements.Add (new CodeMethodReturnStatement (new CodeCastExpression(cmp.Type,cie)));
+ cmp.GetStatements.Add (new CodeMethodReturnStatement (new CodeCastExpression(cmp.Type, cie)));
SysPropsClass.Members.Add(cmp);
}
//private WmiObject _privObject
cmp = new CodeMemberProperty ();
cmp.Name = PublicProperties[prop.Name].ToString();
cmp.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- cmp.Type = ConvertCIMType(prop.Type,prop.IsArray);
+ cmp.Type = ConvertCIMType(prop.Type, prop.IsArray);
if (prop.Type == CimType.DateTime)
{
CodeTypeReference dateType = cmp.Type;
// Check if it is Time interval and if so change the type to Time Interval
- bDateIsTimeInterval = GetDateTimeType(prop,ref dateType);
+ bDateIsTimeInterval = GetDateTimeType(prop, ref dateType);
cmp.Type = dateType;
}
// None of the properties are seriazable thru designer
caa = new CodeAttributeArgument();
- caa.Value = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DesignerSerializationVisibility"),"Hidden");
+ caa.Value = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DesignerSerializationVisibility"), "Hidden");
cad = new CodeAttributeDeclaration();
cad.Name = "DesignerSerializationVisibility";
cad.Arguments.Add(caa);
bool bNullable = false;
- string description = ProcessPropertyQualifiers(prop,ref bRead,ref bWrite,ref bStatic,bDynamicClass,out bNullable);
+ string description = ProcessPropertyQualifiers(prop, ref bRead, ref bWrite, ref bStatic, bDynamicClass, out bNullable);
// If the property is not readable and not writable then don't generate the property
if (bRead == false && bWrite == false)
//enumerator constants: they contain spaces, dots, dashes, etc.
//These need to be modified, otherwise the generated file won't compile.
//Uncomment the line below when that is fixed.
- bool isPropertyEnum = GeneratePropertyHelperEnums(prop,PublicProperties[prop.Name].ToString(), bNullable);
+ bool isPropertyEnum = GeneratePropertyHelperEnums(prop, PublicProperties[prop.Name].ToString(), bNullable);
if (bRead == true)
{
cmie.Method.TargetObject = new CodeTypeReferenceExpression("System.Convert");
cmie.Parameters.Add(new CodePrimitiveExpression(prop.NullEnumValue));
cmie.Method.MethodName = arrConvFuncName;
- cis.TrueStatements.Add(new CodeMethodReturnStatement (new CodeCastExpression(cmp.Type,cmie )));
+ cis.TrueStatements.Add(new CodeMethodReturnStatement (new CodeCastExpression(cmp.Type, cmie )));
}
}
else
{
CodeExpression [] cInit = {cmie };
cis.TrueStatements.Add(new CodeMethodReturnStatement(
- new CodeArrayCreateExpression(cmp.Type,cInit)));
+ new CodeArrayCreateExpression(cmp.Type, cInit)));
}
else
CodeConditionStatement cis2 = new CodeConditionStatement();
- cis2.Condition = new CodeBinaryOperatorExpression(new CodePropertyReferenceExpression(new CodeThisReferenceExpression(),IsValidPropName),
+ cis2.Condition = new CodeBinaryOperatorExpression(new CodePropertyReferenceExpression(new CodeThisReferenceExpression(), IsValidPropName),
CodeBinaryOperatorType.ValueEquality,
new CodePrimitiveExpression(false));
//Call this function to add code for PropertyGet for properties like
// DateTime,TimeSpan and Reference( ie. properties which require some object
// to be created before returning)
- GenerateCodeForRefAndDateTimeTypes(cie,prop.IsArray,cmp.GetStatements,PublicNamesUsed["PathClass"].ToString(),null,false);
+ GenerateCodeForRefAndDateTimeTypes(cie, prop.IsArray, cmp.GetStatements, PublicNamesUsed["PathClass"].ToString(), null, false);
}
else
if (prop.Type == CimType.DateTime)
// to be created before returning)
if (bDateIsTimeInterval)
{
- GenerateCodeForRefAndDateTimeTypes(cie,prop.IsArray,cmp.GetStatements,"System.TimeSpan",null,false);
+ GenerateCodeForRefAndDateTimeTypes(cie, prop.IsArray, cmp.GetStatements, "System.TimeSpan", null, false);
}
else
{
- GenerateCodeForRefAndDateTimeTypes(cie,prop.IsArray,cmp.GetStatements,"System.DateTime",null,false);
+ GenerateCodeForRefAndDateTimeTypes(cie, prop.IsArray, cmp.GetStatements, "System.DateTime", null, false);
}
}
else
{
if (prop.IsArray)
{
- AddGetStatementsForEnumArray(cie,cmp);
+ AddGetStatementsForEnumArray(cie, cmp);
}
else
{
cmie.Method.TargetObject = new CodeTypeReferenceExpression("System.Convert");
cmie.Parameters.Add(cie);
cmie.Method.MethodName = arrConvFuncName;
- cmp.GetStatements.Add (new CodeMethodReturnStatement (new CodeCastExpression(cmp.Type,cmie )));
+ cmp.GetStatements.Add (new CodeMethodReturnStatement (new CodeCastExpression(cmp.Type, cmie )));
}
}
else
{
- cmp.GetStatements.Add (new CodeMethodReturnStatement (new CodeCastExpression(cmp.Type,cie)));
+ cmp.GetStatements.Add (new CodeMethodReturnStatement (new CodeCastExpression(cmp.Type, cie)));
}
}
cmm2 = new CodeMemberMethod ();
cmm2.Name = "Reset" + PublicProperties[prop.Name].ToString();
cmm2.Attributes = MemberAttributes.Private | MemberAttributes.Final;
- cmm2.Statements.Add(new CodeAssignStatement(cie,new CodePrimitiveExpression(null)));
+ cmm2.Statements.Add(new CodeAssignStatement(cie, new CodePrimitiveExpression(null)));
}
// if the type of the property is CIM_REFERENCE then just get the
//Call this function to add code for PropertySet for properties like
// DateTime,TimeSpan and Reference( ie. properties which require some object
// to be created before returning)
- AddPropertySet(cie,prop.IsArray,cmp.SetStatements,PublicNamesUsed["PathClass"].ToString(),null);
+ AddPropertySet(cie, prop.IsArray, cmp.SetStatements, PublicNamesUsed["PathClass"].ToString(), null);
}
else
if (prop.Type == CimType.DateTime)
// to be created before returning)
if (bDateIsTimeInterval)
{
- AddPropertySet(cie,prop.IsArray,cmp.SetStatements,"System.TimeSpan",null);
+ AddPropertySet(cie, prop.IsArray, cmp.SetStatements, "System.TimeSpan", null);
}
else
{
- AddPropertySet(cie,prop.IsArray,cmp.SetStatements,"System.DateTime",null);
+ AddPropertySet(cie, prop.IsArray, cmp.SetStatements, "System.DateTime", null);
}
}
else
CodeBinaryOperatorType.ValueEquality,
new CodeSnippetExpression("value"));
}
- ccs.TrueStatements.Add(new CodeAssignStatement(cie,new CodePrimitiveExpression(null)));
- ccs.FalseStatements.Add(new CodeAssignStatement(cie,new CodeSnippetExpression("value")));
+ ccs.TrueStatements.Add(new CodeAssignStatement(cie, new CodePrimitiveExpression(null)));
+ ccs.FalseStatements.Add(new CodeAssignStatement(cie, new CodeSnippetExpression("value")));
cmp.SetStatements.Add(ccs);
}
else
{
//curObj[<PropertyName>] = value;
- cmp.SetStatements.Add(new CodeAssignStatement(cie,new CodeSnippetExpression("value")));
+ cmp.SetStatements.Add(new CodeAssignStatement(cie, new CodeSnippetExpression("value")));
}
}
/// This function will process the qualifiers for a given WMI property and set the
/// attributes of the generated property accordingly.
/// </summary>
- private string ProcessPropertyQualifiers(PropertyData prop,ref bool bRead, ref bool bWrite, ref bool bStatic,bool bDynamicClass,out bool nullable)
+ private string ProcessPropertyQualifiers(PropertyData prop, ref bool bRead, ref bool bWrite, ref bool bStatic, bool bDynamicClass, out bool nullable)
{
bool hasWrite = false;
bool writeValue = false;
string description = string.Empty;
foreach (QualifierData q in prop.Qualifiers)
{
- if (string.Equals(q.Name,"description",StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(q.Name, "description", StringComparison.OrdinalIgnoreCase))
{
description = q.Value.ToString();
}
else
- if (string.Equals(q.Name,"Not_Null",StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(q.Name, "Not_Null", StringComparison.OrdinalIgnoreCase))
{
nullable = false;
}
else
- if (string.Equals(q.Name,"key",StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(q.Name, "key", StringComparison.OrdinalIgnoreCase))
{
//This is a key. So push it in to the key array
arrKeyType.Add(cmp.Type);
nullable = false;
break;
}
- else if (string.Equals(q.Name,"static",StringComparison.OrdinalIgnoreCase))
+ else if (string.Equals(q.Name, "static", StringComparison.OrdinalIgnoreCase))
{
//This property is static. So add static to the Type of the object
bStatic = true;
cmp.Attributes |= MemberAttributes.Static;
}
- else if (string.Equals(q.Name,"read",StringComparison.OrdinalIgnoreCase))
+ else if (string.Equals(q.Name, "read", StringComparison.OrdinalIgnoreCase))
{
if ((bool)q.Value == false)
{
bRead = true;
}
}
- else if (string.Equals(q.Name,"write",StringComparison.OrdinalIgnoreCase))
+ else if (string.Equals(q.Name, "write", StringComparison.OrdinalIgnoreCase))
{
hasWrite = true;
if ((bool)q.Value == true)
}
// check for ValueMap/Values and BitMap/BitValues pair and create
// Enum Accordingly
- else if (string.Equals(q.Name,"ValueMap",StringComparison.OrdinalIgnoreCase) && bMapsFailed == false)
+ else if (string.Equals(q.Name, "ValueMap", StringComparison.OrdinalIgnoreCase) && bMapsFailed == false)
{
try
{
{
try
{
- arrConvFuncName = ConvertToNumericValueAndAddToArray(prop.Type,strArray[i],ValueMap,out enumType);
+ arrConvFuncName = ConvertToNumericValueAndAddToArray(prop.Type, strArray[i], ValueMap, out enumType);
}
catch (OverflowException)
{
ValueMap.Clear();
}
}
- else if (string.Equals(q.Name,"Values",StringComparison.OrdinalIgnoreCase) && bMapsFailed == false)
+ else if (string.Equals(q.Name, "Values", StringComparison.OrdinalIgnoreCase) && bMapsFailed == false)
{
try
{
string strName = ConvertValuesToName(strArray[i]);
arTemp.Add(strName);
}
- ResolveEnumNameValues(arTemp,ref Values);
+ ResolveEnumNameValues(arTemp, ref Values);
}
}
}
}
}
- else if (string.Equals(q.Name,"BitMap",StringComparison.OrdinalIgnoreCase) && bMapsFailed == false)
+ else if (string.Equals(q.Name, "BitMap", StringComparison.OrdinalIgnoreCase) && bMapsFailed == false)
{
try
{
BitMap.Clear();
}
}
- else if (string.Equals(q.Name,"BitValues",StringComparison.OrdinalIgnoreCase) && bMapsFailed == false)
+ else if (string.Equals(q.Name, "BitValues", StringComparison.OrdinalIgnoreCase) && bMapsFailed == false)
{
try
{
string strName = ConvertValuesToName(strArray[i]);
arTemp.Add(strName);
}
- ResolveEnumNameValues(arTemp,ref BitValues);
+ ResolveEnumNameValues(arTemp, ref BitValues);
}
}
}
if (ValueMap.Count > 0)
{
cmf.InitExpression = new CodePrimitiveExpression(ValueMap[i]);
- long test = System.Convert.ToInt64(ValueMap[i],(IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(ulong)));
+ long test = System.Convert.ToInt64(ValueMap[i], (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(ulong)));
if (test > maxValue) maxValue=test;
if (bZeroFieldInEnum == false)
if (BitMap.Count > 0)
{
cmf.InitExpression = new CodePrimitiveExpression(BitMap[i]);
- long test = System.Convert.ToInt64(BitMap[i],(IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(ulong)));
+ long test = System.Convert.ToInt64(BitMap[i], (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(ulong)));
if (test > maxBitValue) maxBitValue=test;
}
else
if (bZeroFieldInEnum == false)
{
- if ( (System.Convert.ToInt64(BitMap[i],(IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(ulong))) == 0) )
+ if ( (System.Convert.ToInt64(BitMap[i], (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(ulong))) == 0) )
{
bZeroFieldInEnum = true;
}
{
string strPathObject = "strPath";
//Declare the String strPath;
- cmm.Statements.Add(new CodeVariableDeclarationStatement("System.String",strPathObject,new CodePrimitiveExpression(strPath)));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("System.String", strPathObject, new CodePrimitiveExpression(strPath)));
CodeMethodInvokeExpression cmietoAdd;
for (int i=0; i < arrKeys.Count;i++)
{
if (((CodeTypeReference)arrKeyType[i]).BaseType == "System.String")
{
- CodeMethodInvokeExpression cmie1 = GenerateConcatStrings(new CodeVariableReferenceExpression("key"+arrKeys[i]),new CodePrimitiveExpression("\""));
+ CodeMethodInvokeExpression cmie1 = GenerateConcatStrings(new CodeVariableReferenceExpression("key"+arrKeys[i]), new CodePrimitiveExpression("\""));
- CodeMethodInvokeExpression cmie2 = GenerateConcatStrings(new CodePrimitiveExpression("\""),cmie1);
+ CodeMethodInvokeExpression cmie2 = GenerateConcatStrings(new CodePrimitiveExpression("\""), cmie1);
- CodeMethodInvokeExpression cmie3 = GenerateConcatStrings(new CodePrimitiveExpression(((i==0)?("."+arrKeys[i]+"="):(","+arrKeys[i]+"="))),cmie2);
+ CodeMethodInvokeExpression cmie3 = GenerateConcatStrings(new CodePrimitiveExpression(((i==0)?("."+arrKeys[i]+"="):(","+arrKeys[i]+"="))), cmie2);
- cmietoAdd = GenerateConcatStrings(new CodeVariableReferenceExpression(strPathObject),cmie3);
+ cmietoAdd = GenerateConcatStrings(new CodeVariableReferenceExpression(strPathObject), cmie3);
}
else
{
cmie = new CodeMethodInvokeExpression();
- cmie.Method.TargetObject = new CodeCastExpression(new CodeTypeReference(((CodeTypeReference)arrKeyType[i]).BaseType + " "),new CodeVariableReferenceExpression("key"+arrKeys[i]));
+ cmie.Method.TargetObject = new CodeCastExpression(new CodeTypeReference(((CodeTypeReference)arrKeyType[i]).BaseType + " "), new CodeVariableReferenceExpression("key"+arrKeys[i]));
cmie.Method.MethodName = "ToString";
- CodeMethodInvokeExpression cmie1 = GenerateConcatStrings(new CodePrimitiveExpression(((i==0)?("."+arrKeys[i]+"="):(","+arrKeys[i]+"="))),cmie);
+ CodeMethodInvokeExpression cmie1 = GenerateConcatStrings(new CodePrimitiveExpression(((i==0)?("."+arrKeys[i]+"="):(","+arrKeys[i]+"="))), cmie);
- cmietoAdd = GenerateConcatStrings(new CodeVariableReferenceExpression(strPathObject),cmie1);
+ cmietoAdd = GenerateConcatStrings(new CodeVariableReferenceExpression(strPathObject), cmie1);
}
- cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strPathObject),cmietoAdd));
+ cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strPathObject), cmietoAdd));
}
cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression(strPathObject)));
}
cpde.Type = new CodeTypeReference("System.Object");
cpde.Name = "dummyParam";
cctor.Parameters.Add(cpde);
- cctor.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("dummyParam"),new CodePrimitiveExpression(null)));
+ cctor.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("dummyParam"), new CodePrimitiveExpression(null)));
}
cmieInit.Parameters.Add(new CodePrimitiveExpression(null));
{
cctor = new CodeConstructor();
cctor.Attributes = MemberAttributes.Public;
- cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()),PrivateNamesUsed["ScopeParam"].ToString()));
+ cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()), PrivateNamesUsed["ScopeParam"].ToString()));
CodeMethodInvokeExpression cmieInit = new CodeMethodInvokeExpression();
cmieInit.Method.MethodName = PrivateNamesUsed["InitialObjectFunc"].ToString();
cpde.Type = new CodeTypeReference("System.Object");
cpde.Name = "dummyParam";
cctor.Parameters.Add(cpde);
- cctor.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("dummyParam"),new CodePrimitiveExpression(null)));
+ cctor.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("dummyParam"), new CodePrimitiveExpression(null)));
}
cmieInit.Parameters.Add(new CodeCastExpression(
cctor = new CodeConstructor();
cctor.Attributes = MemberAttributes.Public;
- cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()),strPathObject));
- cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["GetOptionsClass"].ToString()),strGetOptions));
+ cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()), strPathObject));
+ cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["GetOptionsClass"].ToString()), strGetOptions));
CodeMethodInvokeExpression cmieInit = new CodeMethodInvokeExpression();
cmieInit.Method.MethodName = PrivateNamesUsed["InitialObjectFunc"].ToString();
cctor = new CodeConstructor();
cctor.Attributes = MemberAttributes.Public;
- cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()),PrivateNamesUsed["ScopeParam"].ToString()));
- cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()),strPathObject));
+ cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()), PrivateNamesUsed["ScopeParam"].ToString()));
+ cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()), strPathObject));
CodeMethodInvokeExpression cmieInit = new CodeMethodInvokeExpression();
cmieInit.Method.MethodName = PrivateNamesUsed["InitialObjectFunc"].ToString();
*/
cctor = new CodeConstructor();
cctor.Attributes = MemberAttributes.Public;
- cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()),PrivateNamesUsed["ScopeParam"].ToString()));
- cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()),strPathObject));
- cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["GetOptionsClass"].ToString()),strGetOptions));
+ cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()), PrivateNamesUsed["ScopeParam"].ToString()));
+ cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()), strPathObject));
+ cctor.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["GetOptionsClass"].ToString()), strGetOptions));
CodeMethodInvokeExpression cmieInit = new CodeMethodInvokeExpression();
cmieInit.Method.MethodName = PrivateNamesUsed["InitialObjectFunc"].ToString();
InitPrivateMemberVariables(cctor);
cis = new CodeConditionStatement();
- cpre = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strLateBoundObject),LateBoundSystemProperties);
- cie = new CodeIndexerExpression(cpre,new CodePrimitiveExpression("__CLASS"));
- cpre = new CodePropertyReferenceExpression(cie,"Value");
+ cpre = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strLateBoundObject), LateBoundSystemProperties);
+ cie = new CodeIndexerExpression(cpre, new CodePrimitiveExpression("__CLASS"));
+ cpre = new CodePropertyReferenceExpression(cie, "Value");
cmie = new CodeMethodInvokeExpression();
coce = new CodeObjectCreateExpression();
coce.CreateType = new CodeTypeReference(PublicNamesUsed["SystemPropertiesClass"].ToString());
coce.Parameters.Add(new CodeVariableReferenceExpression(PrivateNamesUsed["LateBoundObject"].ToString()));
- cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(PrivateNamesUsed["SystemPropertiesObject"].ToString()),coce));
+ cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(PrivateNamesUsed["SystemPropertiesObject"].ToString()), coce));
cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(PrivateNamesUsed["CurrentObject"].ToString()),
new CodeVariableReferenceExpression(PrivateNamesUsed["LateBoundObject"].ToString())));
coce = new CodeObjectCreateExpression();
coce.CreateType = new CodeTypeReference(PublicNamesUsed["SystemPropertiesClass"].ToString());
coce.Parameters.Add(new CodeVariableReferenceExpression(strLateBoundObject));
- cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(PrivateNamesUsed["SystemPropertiesObject"].ToString()),coce));
+ cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(PrivateNamesUsed["SystemPropertiesObject"].ToString()), coce));
cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(PrivateNamesUsed["CurrentObject"].ToString()),
new CodeVariableReferenceExpression(PrivateNamesUsed["EmbeddedObject"].ToString())));
cmmInit.Name = PrivateNamesUsed["InitialObjectFunc"].ToString();
cmmInit.Attributes = MemberAttributes.Private | MemberAttributes.Final;
- cmmInit.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()),PrivateNamesUsed["ScopeParam"].ToString()));
- cmmInit.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()),strPathObject));
- cmmInit.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["GetOptionsClass"].ToString()),strGetOptions));
+ cmmInit.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()), PrivateNamesUsed["ScopeParam"].ToString()));
+ cmmInit.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()), strPathObject));
+ cmmInit.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["GetOptionsClass"].ToString()), strGetOptions));
// call this to call function to initialize memeber variables
InitPrivateMemberVariables(cmmInit);
//Check if the method is static
foreach (QualifierData q in meth.Qualifiers)
{
- if (string.Equals(q.Name,"static",StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(q.Name, "static", StringComparison.OrdinalIgnoreCase))
{
//It is a static function
cmm.Attributes |= MemberAttributes.Static;
break;
}
else
- if (string.Equals(q.Name,"privileges",StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(q.Name, "privileges", StringComparison.OrdinalIgnoreCase))
{
//It is a function which needs privileges to be set
bPrivileges = true;
if (bStatic)
{
- cmm.Statements.Add(new CodeVariableDeclarationStatement("System.Boolean","IsMethodStatic",new CodePrimitiveExpression(bStatic)));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("System.Boolean", "IsMethodStatic", new CodePrimitiveExpression(bStatic)));
cboe.Left = new CodeVariableReferenceExpression("IsMethodStatic");
cboe.Right = new CodePrimitiveExpression(true);
}
//Generate the statement
// ManagementBaseObject inParams = null;
cis.TrueStatements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(PublicNamesUsed["BaseObjClass"].ToString()),
- strInParams,new CodePrimitiveExpression(null)));
+ strInParams, new CodePrimitiveExpression(null)));
if (bStatic == true)
CodeObjectCreateExpression cocePath = new CodeObjectCreateExpression();
cocePath.CreateType = new CodeTypeReference(PublicNamesUsed["PathClass"].ToString());
cocePath.Parameters.Add(new CodeVariableReferenceExpression(PrivateNamesUsed["CreationClassName"].ToString()));
- cis.TrueStatements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()),strPath,cocePath));
+ cis.TrueStatements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()), strPath, cocePath));
CodeObjectCreateExpression coce1 = new CodeObjectCreateExpression();
coce1.CreateType = new CodeTypeReference(PublicNamesUsed["ManagementClass"].ToString());
coce = new CodeObjectCreateExpression();
coce.CreateType = new CodeTypeReference(PublicNamesUsed["ManagementClass"].ToString());
coce.Parameters.Add(coce1);
- cis.TrueStatements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(PublicNamesUsed["ManagementClass"].ToString()),strClassObj,coce1));
+ cis.TrueStatements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(PublicNamesUsed["ManagementClass"].ToString()), strClassObj, coce1));
strTemp = strClassObj;
}
"EnablePrivileges");
cis.TrueStatements.Add(new CodeVariableDeclarationStatement("System.Boolean",
- PrivateNamesUsed["Privileges"].ToString(),cprePriveleges));
+ PrivateNamesUsed["Privileges"].ToString(), cprePriveleges));
cis.TrueStatements.Add(new CodeAssignStatement(cprePriveleges, new CodePrimitiveExpression(true)));
new CodeVariableReferenceExpression(strTemp),
"GetMethodParameters",
new CodePrimitiveExpression(meth.Name));
- cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strInParams),cmie));
+ cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strInParams), cmie));
bfirst = false;
}
cpde = new CodeParameterDeclarationExpression();
cpde.Name = prop.Name;
- cpde.Type = ConvertCIMType(prop.Type,prop.IsArray);
+ cpde.Type = ConvertCIMType(prop.Type, prop.IsArray);
cpde.Direction = FieldDirection.In;
{
CodeTypeReference dateType = cpde.Type;
// Check if it is Time interval and if so change the type to Time Interval
- bIsCimDateTimeInterval = GetDateTimeType(prop,ref dateType);
+ bIsCimDateTimeInterval = GetDateTimeType(prop, ref dateType);
cpde.Type = dateType;
}
//Find out whether it is a in/out Parameter
for (int i=0; i < outParamsName.Count;i++)
{
- if (string.Equals(prop.Name,outParamsName[i].ToString(),StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(prop.Name, outParamsName[i].ToString(), StringComparison.OrdinalIgnoreCase))
{
//It is an in/out Parameter
cpde.Direction = FieldDirection.Ref;
cmm.Parameters.Add(cpde);
//Also generate the statement
//inParams["PropName"] = Value;
- cie = new CodeIndexerExpression(new CodeVariableReferenceExpression(strInParams),new CodePrimitiveExpression(prop.Name));
+ cie = new CodeIndexerExpression(new CodeVariableReferenceExpression(strInParams), new CodePrimitiveExpression(prop.Name));
// if the type of the property is CIM_REFERENCE then just get the
{
//Call this function to add code for converting the path to
// string and assigning it to parameter
- AddPropertySet(cie,prop.IsArray,cis.TrueStatements,PublicNamesUsed["PathClass"].ToString(),new CodeVariableReferenceExpression(cpde.Name));
+ AddPropertySet(cie, prop.IsArray, cis.TrueStatements, PublicNamesUsed["PathClass"].ToString(), new CodeVariableReferenceExpression(cpde.Name));
}
else
if (prop.Type == CimType.DateTime)
// and assigning it to the parameter
if (bIsCimDateTimeInterval)
{
- AddPropertySet(cie,prop.IsArray,cis.TrueStatements,"System.TimeSpan",new CodeVariableReferenceExpression(cpde.Name));
+ AddPropertySet(cie, prop.IsArray, cis.TrueStatements, "System.TimeSpan", new CodeVariableReferenceExpression(cpde.Name));
}
else
{
- AddPropertySet(cie,prop.IsArray,cis.TrueStatements,"System.DateTime",new CodeVariableReferenceExpression(cpde.Name));
+ AddPropertySet(cie, prop.IsArray, cis.TrueStatements, "System.DateTime", new CodeVariableReferenceExpression(cpde.Name));
}
}
else
if (cpde.Type.ArrayRank == 0)
{
// Work around
- cis.TrueStatements.Add(new CodeAssignStatement(cie,new CodeCastExpression(new CodeTypeReference(cpde.Type.BaseType + " "),
+ cis.TrueStatements.Add(new CodeAssignStatement(cie, new CodeCastExpression(new CodeTypeReference(cpde.Type.BaseType + " "),
new CodeVariableReferenceExpression(cpde.Name))));
}
else
{
- cis.TrueStatements.Add(new CodeAssignStatement(cie,new CodeCastExpression(cpde.Type,new CodeVariableReferenceExpression(cpde.Name))));
+ cis.TrueStatements.Add(new CodeAssignStatement(cie, new CodeCastExpression(cpde.Type, new CodeVariableReferenceExpression(cpde.Name))));
}
}
}
cmie.Parameters.Add(new CodePrimitiveExpression(meth.Name));
cmie.Parameters.Add(new CodeVariableReferenceExpression(strInParams));
cmie.Parameters.Add(new CodePrimitiveExpression(null));
- cis.TrueStatements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(PublicNamesUsed["BaseObjClass"].ToString()),strOutParams,cmie));
+ cis.TrueStatements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(PublicNamesUsed["BaseObjClass"].ToString()), strOutParams, cmie));
bfirst = false;
bInvoke = true;
}
bInOut = false;
for (int i=0; i < inoutParams.Count;i++)
{
- if (string.Equals(prop.Name,inoutParams[i].ToString(),StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(prop.Name, inoutParams[i].ToString(), StringComparison.OrdinalIgnoreCase))
{
bInOut = true;
}
if (bInOut == true)
continue;
- if (string.Equals(prop.Name,"ReturnValue",StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(prop.Name, "ReturnValue", StringComparison.OrdinalIgnoreCase))
{
- cmm.ReturnType = ConvertCIMType(prop.Type,prop.IsArray);
+ cmm.ReturnType = ConvertCIMType(prop.Type, prop.IsArray);
bRetVal = true;
cimRetType = prop.Type;
{
CodeTypeReference dateType = cmm.ReturnType;
// Check if it is Time interval and if so change the type to Time Interval
- bool isRetTypeTimeInterval = GetDateTimeType(prop,ref dateType);
+ bool isRetTypeTimeInterval = GetDateTimeType(prop, ref dateType);
cmm.ReturnType = dateType;
}
retRefType = cmm.ReturnType;
{
cpde = new CodeParameterDeclarationExpression();
cpde.Name = prop.Name;
- cpde.Type = ConvertCIMType(prop.Type,prop.IsArray);
+ cpde.Type = ConvertCIMType(prop.Type, prop.IsArray);
cpde.Direction = FieldDirection.Out;
cmm.Parameters.Add(cpde);
{
CodeTypeReference dateType = cpde.Type;
// Check if it is Time interval and if so change the type to Time Interval
- bIsCimDateTimeInterval = GetDateTimeType(prop,ref dateType);
+ bIsCimDateTimeInterval = GetDateTimeType(prop, ref dateType);
cpde.Type = dateType;
}
//Now for each out params generate the statement
// <outParam> = outParams.Properties["<outParam>"];
- cpre = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strOutParams),"Properties");
- cie = new CodeIndexerExpression(cpre,new CodePrimitiveExpression(prop.Name));
+ cpre = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strOutParams), "Properties");
+ cie = new CodeIndexerExpression(cpre, new CodePrimitiveExpression(prop.Name));
if (prop.Type == CimType.Reference)
{
//Call this function to add code for converting string CIM_REFERENCE
// to ManagementPath
- GenerateCodeForRefAndDateTimeTypes(cie,prop.IsArray,cis.TrueStatements,PublicNamesUsed["PathClass"].ToString(),new CodeVariableReferenceExpression(prop.Name),true);
+ GenerateCodeForRefAndDateTimeTypes(cie, prop.IsArray, cis.TrueStatements, PublicNamesUsed["PathClass"].ToString(), new CodeVariableReferenceExpression(prop.Name), true);
}
else
if (prop.Type == CimType.DateTime)
// to System.DateTime
if (bIsCimDateTimeInterval)
{
- GenerateCodeForRefAndDateTimeTypes(cie,prop.IsArray,cis.TrueStatements,"System.TimeSpan",new CodeVariableReferenceExpression(prop.Name),true);
+ GenerateCodeForRefAndDateTimeTypes(cie, prop.IsArray, cis.TrueStatements, "System.TimeSpan", new CodeVariableReferenceExpression(prop.Name), true);
}
else
{
- GenerateCodeForRefAndDateTimeTypes(cie,prop.IsArray,cis.TrueStatements,"System.DateTime",new CodeVariableReferenceExpression(prop.Name),true);
+ GenerateCodeForRefAndDateTimeTypes(cie, prop.IsArray, cis.TrueStatements, "System.DateTime", new CodeVariableReferenceExpression(prop.Name), true);
}
}
else
if (prop.IsArray || prop.Type == CimType.Object)
{
cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(prop.Name),
- new CodeCastExpression(ConvertCIMType(prop.Type,prop.IsArray),
- new CodePropertyReferenceExpression(cie,"Value"))));
+ new CodeCastExpression(ConvertCIMType(prop.Type, prop.IsArray),
+ new CodePropertyReferenceExpression(cie, "Value"))));
}
else
{
cmie2 = new CodeMethodInvokeExpression();
- cmie2.Parameters.Add(new CodePropertyReferenceExpression(cie,"Value"));
+ cmie2.Parameters.Add(new CodePropertyReferenceExpression(cie, "Value"));
cmie2.Method.MethodName = GetConversionFunction(prop.Type);
cmie2.Method.TargetObject = new CodeTypeReferenceExpression("System.Convert");
- cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(prop.Name),cmie2));
+ cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(prop.Name), cmie2));
}
}
coce.Parameters.Add(new CodePrimitiveExpression(0));
coce.Parameters.Add(new CodePrimitiveExpression(0));
- cis.FalseStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(prop.Name),coce));
+ cis.FalseStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(prop.Name), coce));
}
else
{
cmie2.Parameters.Add(new CodePrimitiveExpression(0));
cmie2.Method.MethodName = GetConversionFunction(prop.Type);
cmie2.Method.TargetObject = new CodeTypeReferenceExpression("System.Convert");
- cis.FalseStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(prop.Name),cmie2));
+ cis.FalseStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(prop.Name), cmie2));
}
else
{
// <inoutParam> = outParams.Properties["<inoutParam>"];
for (int i=0;i < inoutParams.Count;i++)
{
- cpre = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strOutParams),"Properties");
- cie = new CodeIndexerExpression(cpre,new CodePrimitiveExpression(inoutParams[i].ToString()));
+ cpre = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strOutParams), "Properties");
+ cie = new CodeIndexerExpression(cpre, new CodePrimitiveExpression(inoutParams[i].ToString()));
cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(inoutParams[i].ToString()),
new CodeCastExpression((CodeTypeReference)inoutParamsType[i],
- new CodePropertyReferenceExpression(cie,"Value"))));
+ new CodePropertyReferenceExpression(cie, "Value"))));
}
inoutParams.Clear();
//Now check if there is a return value. If there is one then return it from the function
if (bRetVal == true)
{
- CodeVariableDeclarationStatement cRetVal = new CodeVariableDeclarationStatement(retRefType,"retVar");
- cpre = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strOutParams),"Properties");
- cie = new CodeIndexerExpression(cpre,new CodePrimitiveExpression("ReturnValue"));
+ CodeVariableDeclarationStatement cRetVal = new CodeVariableDeclarationStatement(retRefType, "retVar");
+ cpre = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strOutParams), "Properties");
+ cie = new CodeIndexerExpression(cpre, new CodePrimitiveExpression("ReturnValue"));
if (retRefType.BaseType == new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()).BaseType)
{
cmm.Statements.Add(cRetVal);
- cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("retVar"),new CodePrimitiveExpression(null)));
+ cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("retVar"), new CodePrimitiveExpression(null)));
//Call this function to add code for converting string CIM_REFERENCE
// to ManagementPath and return
- GenerateCodeForRefAndDateTimeTypes(cie,isRetArray,cis.TrueStatements,PublicNamesUsed["PathClass"].ToString(),new CodeVariableReferenceExpression("retVar"),true);
+ GenerateCodeForRefAndDateTimeTypes(cie, isRetArray, cis.TrueStatements, PublicNamesUsed["PathClass"].ToString(), new CodeVariableReferenceExpression("retVar"), true);
cis.TrueStatements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("retVar")));
cis.FalseStatements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(null)));
}
{
cmm.Statements.Add(cRetVal);
cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("retVar"),
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.DateTime"),"MinValue")));
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.DateTime"), "MinValue")));
//Call this function to add code for converting DMTF format string datetime to System.DateTime before returning
- GenerateCodeForRefAndDateTimeTypes(cie,isRetArray,cis.TrueStatements,"System.DateTime",new CodeVariableReferenceExpression("retVar"),true);
+ GenerateCodeForRefAndDateTimeTypes(cie, isRetArray, cis.TrueStatements, "System.DateTime", new CodeVariableReferenceExpression("retVar"), true);
cis.TrueStatements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("retVar")));
cis.FalseStatements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("retVar")));
}
coce.Parameters.Add(new CodePrimitiveExpression(0));
coce.Parameters.Add(new CodePrimitiveExpression(0));
- cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("retVar"),coce));
+ cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("retVar"), coce));
//Call this function to add code for converting DMTF format string Time Interval to System.TimeSpan before returning
- GenerateCodeForRefAndDateTimeTypes(cie,isRetArray,cis.TrueStatements,"System.TimeSpan",new CodeVariableReferenceExpression("retVar"),true);
+ GenerateCodeForRefAndDateTimeTypes(cie, isRetArray, cis.TrueStatements, "System.TimeSpan", new CodeVariableReferenceExpression("retVar"), true);
cis.TrueStatements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("retVar")));
cis.FalseStatements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("retVar")));
}
if (retRefType.ArrayRank == 0 && retRefType.BaseType != new CodeTypeReference(PublicNamesUsed["BaseObjClass"].ToString()).BaseType)
{
cmie = new CodeMethodInvokeExpression();
- cmie.Parameters.Add(new CodePropertyReferenceExpression(cie,"Value"));
+ cmie.Parameters.Add(new CodePropertyReferenceExpression(cie, "Value"));
cmie.Method.MethodName = GetConversionFunction(cimRetType);
cmie.Method.TargetObject = new CodeTypeReferenceExpression("System.Convert");
else
{
cis.TrueStatements.Add(new CodeMethodReturnStatement(
- new CodeCastExpression(retRefType,new CodePropertyReferenceExpression(cie,"Value"))));
+ new CodeCastExpression(retRefType, new CodePropertyReferenceExpression(cie, "Value"))));
cis.FalseStatements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(null)));
}
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.Parameters.Add(new CodeParameterDeclarationExpression("System.String", strCondition));
cmie = new CodeMethodInvokeExpression(
null, //no TargetObject?
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));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.String []", strSelectedProperties));
cmie = new CodeMethodInvokeExpression(
null,
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.Parameters.Add(new CodeParameterDeclarationExpression("System.String []",strSelectedProperties));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.String", strCondition));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.String []", strSelectedProperties));
cmie = new CodeMethodInvokeExpression(
null, //no TargetObject?
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()));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()), PrivateNamesUsed["ScopeParam"].ToString()));
cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["QueryOptionsClass"].ToString()),
PrivateNamesUsed["EnumParam"].ToString()));
coce = new CodeObjectCreateExpression();
coce.CreateType = new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString());
- cis1.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(PrivateNamesUsed["ScopeParam"].ToString()),coce));
+ cis1.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(PrivateNamesUsed["ScopeParam"].ToString()), coce));
cis1.TrueStatements.Add(new CodeAssignStatement(new CodePropertyReferenceExpression(
new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(PrivateNamesUsed["ScopeParam"].ToString()),
- "Path"),"NamespacePath"),
+ "Path"), "NamespacePath"),
new CodePrimitiveExpression(classobj.Scope.Path.NamespacePath)));
coce = new CodeObjectCreateExpression();
coce.CreateType = new CodeTypeReference(PublicNamesUsed["PathClass"].ToString());
- cmm.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()),pathObj,coce));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()), pathObj, coce));
cmm.Statements.Add(new CodeAssignStatement(new CodePropertyReferenceExpression(
- new CodeVariableReferenceExpression(pathObj),"ClassName"),
+ new CodeVariableReferenceExpression(pathObj), "ClassName"),
new CodePrimitiveExpression(OriginalClassName)));
cmm.Statements.Add(new CodeAssignStatement(new CodePropertyReferenceExpression(
- new CodeVariableReferenceExpression(pathObj),"NamespacePath"),
+ new CodeVariableReferenceExpression(pathObj), "NamespacePath"),
new CodePrimitiveExpression(classobj.Scope.Path.NamespacePath)));
coce.Parameters.Add(new CodePrimitiveExpression(null));
cmm.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(PublicNamesUsed["ManagementClass"].ToString()),
- strClass,coce));
+ strClass, coce));
cis = new CodeConditionStatement();
cboe = new CodeBinaryOperatorExpression();
coce.CreateType = new CodeTypeReference(PrivateNamesUsed["CollectionClass"].ToString());
cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(strClass),"GetInstances");
+ cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(strClass), "GetInstances");
cmie.Parameters.Add(new CodeVariableReferenceExpression(PrivateNamesUsed["EnumParam"].ToString()));
coce.Parameters.Add(cmie);
cmm.Statements.Add(new CodeMethodReturnStatement(coce));
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()));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.String"),strCondition));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()), PrivateNamesUsed["ScopeParam"].ToString()));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.String"), strCondition));
cmie = new CodeMethodInvokeExpression(
null,
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()));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.String []",strSelectedProperties));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(PublicNamesUsed["ScopeClass"].ToString(), PrivateNamesUsed["ScopeParam"].ToString()));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.String []", strSelectedProperties));
cmie = new CodeMethodInvokeExpression(
null, //no TargetObject?
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()));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.String",strCondition));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.String []",strSelectedProperties));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()), PrivateNamesUsed["ScopeParam"].ToString()));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.String", strCondition));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.String []", strSelectedProperties));
cis = new CodeConditionStatement();
cboe = new CodeBinaryOperatorExpression();
coce = new CodeObjectCreateExpression();
coce.CreateType = new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString());
- cis1.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(PrivateNamesUsed["ScopeParam"].ToString()),coce));
+ cis1.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(PrivateNamesUsed["ScopeParam"].ToString()), coce));
cis1.TrueStatements.Add(new CodeAssignStatement(new CodePropertyReferenceExpression(
new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(PrivateNamesUsed["ScopeParam"].ToString()),
- "Path"),"NamespacePath"),
+ "Path"), "NamespacePath"),
new CodePrimitiveExpression(classobj.Scope.Path.NamespacePath)));
cis1.FalseStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(PrivateNamesUsed["ScopeParam"].ToString()),
coce.Parameters.Add(coce1);
cmm.Statements.Add(new CodeVariableDeclarationStatement(PublicNamesUsed["ObjectSearcherClass"].ToString(),
- strObjectSearcher,coce));
+ strObjectSearcher, coce));
coce = new CodeObjectCreateExpression();
coce.CreateType = new CodeTypeReference(PublicNamesUsed["QueryOptionsClass"].ToString());
cmm.Statements.Add(new CodeVariableDeclarationStatement(
new CodeTypeReference(PublicNamesUsed["QueryOptionsClass"].ToString()),
- PrivateNamesUsed["EnumParam"].ToString(),coce));
+ PrivateNamesUsed["EnumParam"].ToString(), coce));
cmm.Statements.Add(new CodeAssignStatement(new CodePropertyReferenceExpression(
new CodeVariableReferenceExpression(PrivateNamesUsed["EnumParam"].ToString()),
/// The generated code will look like this
/// private <MemberType> <MemberName>;
/// </summary>
- private void GeneratePrivateMember(string memberName,string MemberType,string Comment)
+ private void GeneratePrivateMember(string memberName, string MemberType, string Comment)
{
- GeneratePrivateMember(memberName,MemberType,null,false,Comment);
+ GeneratePrivateMember(memberName, MemberType, null, false, Comment);
}
/// <summary>
/// The generated code will look like this
/// private <MemberType> <MemberName> = <initValue>;
/// </summary>
- private void GeneratePrivateMember(string memberName,string MemberType,CodeExpression initExpression,bool isStatic,string Comment)
+ private void GeneratePrivateMember(string memberName, string MemberType, CodeExpression initExpression, bool isStatic, string Comment)
{
cf = new CodeMemberField();
cf.Name = memberName;
cpde.Type = new CodeTypeReference("System.Type");
cctor.Parameters.Add(cpde);
- cmie = new CodeMethodInvokeExpression(new CodeTypeReferenceExpression(TypeDescriptorClass),"GetConverter");
+ cmie = new CodeMethodInvokeExpression(new CodeTypeReferenceExpression(TypeDescriptorClass), "GetConverter");
cmie.Parameters.Add(new CodeVariableReferenceExpression(baseTypeParam));
- cctor.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(baseTypeMemberVariable),cmie));
+ cctor.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(baseTypeMemberVariable), cmie));
// second assignment in ctor
- cctor.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(typeMemberVariable),new CodeVariableReferenceExpression(baseTypeParam)));
+ cctor.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(typeMemberVariable), new CodeVariableReferenceExpression(baseTypeParam)));
// add the ctor to the class
CodeConvertorClass.Members.Add(cctor);
cmm.Name = "CanConvertFrom";
cmm.ReturnType = new CodeTypeReference("System.Boolean");
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass,contextObject));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.Type",srcType));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass, contextObject));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.Type", srcType));
- cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable),"CanConvertFrom");
+ cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable), "CanConvertFrom");
cmie.Parameters.Add(new CodeVariableReferenceExpression(contextObject));
cmie.Parameters.Add(new CodeVariableReferenceExpression(srcType));
cmm.Name = "CanConvertTo";
cmm.ReturnType = new CodeTypeReference("System.Boolean");
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass,contextObject));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.Type",TypeDstObject));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass, contextObject));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.Type", TypeDstObject));
- cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable),"CanConvertTo");
+ cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable), "CanConvertTo");
cmie.Parameters.Add(new CodeVariableReferenceExpression(contextObject));
cmie.Parameters.Add(new CodeVariableReferenceExpression(TypeDstObject));
cmm.Name = "ConvertFrom";
cmm.ReturnType = new CodeTypeReference("System.Object");
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass,contextObject));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(CultureInfoClass,CultureInfoVar));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"),ValueVar));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass, contextObject));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(CultureInfoClass, CultureInfoVar));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"), ValueVar));
- cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable),"ConvertFrom");
+ cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable), "ConvertFrom");
cmie.Parameters.Add(new CodeVariableReferenceExpression(contextObject));
cmie.Parameters.Add(new CodeVariableReferenceExpression(CultureInfoVar));
cmie.Parameters.Add(new CodeVariableReferenceExpression(ValueVar));
cmm.ReturnType = new CodeTypeReference("System.Object");
cmm.Name = "CreateInstance";
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass,contextObject));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(IDictionary,DictVar));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass, contextObject));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(IDictionary, DictVar));
- cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable),"CreateInstance");
+ cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable), "CreateInstance");
cmie.Parameters.Add(new CodeVariableReferenceExpression(contextObject));
cmie.Parameters.Add(new CodeVariableReferenceExpression(DictVar));
cmm.Name = "GetCreateInstanceSupported";
cmm.ReturnType = new CodeTypeReference("System.Boolean");
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass,contextObject));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass, contextObject));
- cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable),"GetCreateInstanceSupported");
+ cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable), "GetCreateInstanceSupported");
cmie.Parameters.Add(new CodeVariableReferenceExpression(contextObject));
cmm.Statements.Add(new CodeMethodReturnStatement(cmie));
cmm = new CodeMemberMethod();
cmm.Attributes = MemberAttributes.Public | MemberAttributes.Override | MemberAttributes.Overloaded;
cmm.Name = "GetProperties";
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass,contextObject));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"),ValueVar));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass, contextObject));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"), ValueVar));
- CodeTypeReference crt = new CodeTypeReference(new CodeTypeReference("System.Attribute"),1);
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(crt,AttributeVar));
+ CodeTypeReference crt = new CodeTypeReference(new CodeTypeReference("System.Attribute"), 1);
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(crt, AttributeVar));
cmm.ReturnType = new CodeTypeReference(propColl);
- cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable),"GetProperties");
+ cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable), "GetProperties");
cmie.Parameters.Add(new CodeVariableReferenceExpression(contextObject));
cmie.Parameters.Add(new CodeVariableReferenceExpression(ValueVar));
cmie.Parameters.Add(new CodeVariableReferenceExpression(AttributeVar));
cmm = new CodeMemberMethod();
cmm.Attributes = MemberAttributes.Public | MemberAttributes.Override | MemberAttributes.Overloaded;
cmm.Name = "GetPropertiesSupported";
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass,contextObject));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass, contextObject));
cmm.ReturnType = new CodeTypeReference("System.Boolean");
- cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable),"GetPropertiesSupported");
+ cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable), "GetPropertiesSupported");
cmie.Parameters.Add(new CodeVariableReferenceExpression(contextObject));
cmm.Statements.Add(new CodeMethodReturnStatement(cmie));
cmm = new CodeMemberMethod();
cmm.Attributes = MemberAttributes.Public | MemberAttributes.Override | MemberAttributes.Overloaded;
cmm.Name = "GetStandardValues";
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass,contextObject));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass, contextObject));
cmm.ReturnType = new CodeTypeReference("System.ComponentModel.TypeConverter.StandardValuesCollection");
- cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable),"GetStandardValues");
+ cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable), "GetStandardValues");
cmie.Parameters.Add(new CodeVariableReferenceExpression(contextObject));
cmm.Statements.Add(new CodeMethodReturnStatement(cmie));
cmm = new CodeMemberMethod();
cmm.Attributes = MemberAttributes.Public | MemberAttributes.Override | MemberAttributes.Overloaded;
cmm.Name = "GetStandardValuesExclusive";
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass,contextObject));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass, contextObject));
cmm.ReturnType = new CodeTypeReference("System.Boolean");
- cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable),"GetStandardValuesExclusive");
+ cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable), "GetStandardValuesExclusive");
cmie.Parameters.Add(new CodeVariableReferenceExpression(contextObject));
cmm.Statements.Add(new CodeMethodReturnStatement(cmie));
cmm = new CodeMemberMethod();
cmm.Attributes = MemberAttributes.Public | MemberAttributes.Override | MemberAttributes.Overloaded;
cmm.Name = "GetStandardValuesSupported";
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass,contextObject));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass, contextObject));
cmm.ReturnType = new CodeTypeReference("System.Boolean");
- cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable),"GetStandardValuesSupported");
+ cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable), "GetStandardValuesSupported");
cmie.Parameters.Add(new CodeVariableReferenceExpression(contextObject));
cmm.Statements.Add(new CodeMethodReturnStatement(cmie));
cmm.Attributes = MemberAttributes.Public | MemberAttributes.Override | MemberAttributes.Overloaded;
cmm.Name = "ConvertTo";
// add the 3 parameters
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass,contextObject));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(CultureInfoClass,CultureInfoVar));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"),ValueVar));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.Type",TypeDstObject));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(TypeDescriptorContextClass, contextObject));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(CultureInfoClass, CultureInfoVar));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"), ValueVar));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression("System.Type", TypeDstObject));
cmm.ReturnType = new CodeTypeReference("System.Object");
// make the generic return statement we'll need all over
/*
return baseConverter.ConvertTo(context, culture, value, destinationType);
*/
- cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable),"ConvertTo");
+ cmie = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(baseTypeMemberVariable), "ConvertTo");
cmie.Parameters.Add(new CodeVariableReferenceExpression(contextObject));
cmie.Parameters.Add(new CodeVariableReferenceExpression(CultureInfoVar));
cmie.Parameters.Add(new CodeVariableReferenceExpression(ValueVar));
CodeBinaryOperatorExpression cboe2 = new CodeBinaryOperatorExpression();
cboe2.Left = new CodeMethodInvokeExpression(
- new CodeVariableReferenceExpression("value"),"GetType");
+ new CodeVariableReferenceExpression("value"), "GetType");
cboe2.Right = new CodeVariableReferenceExpression("destinationType");
cboe2.Operator = CodeBinaryOperatorType.IdentityEquality;
- cis.TrueStatements.Add(new CodeConditionStatement(cboe2,new CodeMethodReturnStatement(new CodeVariableReferenceExpression("value"))));
+ cis.TrueStatements.Add(new CodeConditionStatement(cboe2, new CodeMethodReturnStatement(new CodeVariableReferenceExpression("value"))));
// work on second true statement
CodeBinaryOperatorExpression cboe3 = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("value"),
cboe5.Right = cboe4;
cboe5.Operator = CodeBinaryOperatorType.BooleanAnd;
- cmie = new CodeMethodInvokeExpression(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(contextObject),"PropertyDescriptor"),"ShouldSerializeValue");
- cmie.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(contextObject),"Instance"));
+ cmie = new CodeMethodInvokeExpression(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(contextObject), "PropertyDescriptor"), "ShouldSerializeValue");
+ cmie.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(contextObject), "Instance"));
CodeBinaryOperatorExpression cboe6 = new CodeBinaryOperatorExpression(cmie,
CodeBinaryOperatorType.ValueEquality,
cboe7.Right = cboe6;
cboe7.Operator = CodeBinaryOperatorType.BooleanAnd;
- cis.TrueStatements.Add(new CodeConditionStatement(cboe7,new CodeMethodReturnStatement(new CodeSnippetExpression(" \"NULL_ENUM_VALUE\" "))));
+ cis.TrueStatements.Add(new CodeConditionStatement(cboe7, new CodeMethodReturnStatement(new CodeSnippetExpression(" \"NULL_ENUM_VALUE\" "))));
// add the final returnstatement
cis.TrueStatements.Add(returnStatement);
cboe5.Right = cboe4;
cboe5.Operator = CodeBinaryOperatorType.BooleanAnd;
- cmie = new CodeMethodInvokeExpression(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(contextObject),"PropertyDescriptor"),"ShouldSerializeValue");
- cmie.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(contextObject),"Instance"));
+ cmie = new CodeMethodInvokeExpression(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(contextObject), "PropertyDescriptor"), "ShouldSerializeValue");
+ cmie.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(contextObject), "Instance"));
cboe6 = new CodeBinaryOperatorExpression(cmie,
CodeBinaryOperatorType.ValueEquality,
cboe7.Right = cboe6;
cboe7.Operator = CodeBinaryOperatorType.BooleanAnd;
- cis.TrueStatements.Add(new CodeConditionStatement(cboe7,new CodeMethodReturnStatement(new CodePrimitiveExpression(""))));
+ cis.TrueStatements.Add(new CodeConditionStatement(cboe7, new CodeMethodReturnStatement(new CodePrimitiveExpression(""))));
// add the final returnstatement
cis.TrueStatements.Add(returnStatement);
CodeBinaryOperatorType.IdentityInequality,
new CodePrimitiveExpression(null));
- cmie = new CodeMethodInvokeExpression(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(contextObject),"PropertyDescriptor"),"ShouldSerializeValue");
- cmie.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(contextObject),"Instance"));
+ cmie = new CodeMethodInvokeExpression(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(contextObject), "PropertyDescriptor"), "ShouldSerializeValue");
+ cmie.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(contextObject), "Instance"));
cboe2 = new CodeBinaryOperatorExpression(cmie,
CodeBinaryOperatorType.ValueEquality,
cmie.Parameters.Add(new CodeVariableReferenceExpression(strIndex));
cmm.Statements.Add(new CodeExpressionStatement(cmie));
- cmm.Statements.Add(new CodeVariableDeclarationStatement("System.Int32",strnCtr));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("System.Int32", strnCtr));
cfls = new CodeIterationStatement();
- cfls.InitStatement = new CodeAssignStatement(new CodeVariableReferenceExpression(strnCtr),new CodePrimitiveExpression(0));
+ cfls.InitStatement = new CodeAssignStatement(new CodeVariableReferenceExpression(strnCtr), new CodePrimitiveExpression(0));
cboe = new CodeBinaryOperatorExpression();
cboe.Left = new CodeVariableReferenceExpression(strnCtr);
cboe.Operator = CodeBinaryOperatorType.LessThan;
- cboe.Right = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strArray),"Length");
+ cboe.Right = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strArray), "Length");
cfls.TestExpression = cboe;
cfls.IncrementStatement = new CodeAssignStatement(new CodeVariableReferenceExpression(strnCtr),
new CodeBinaryOperatorExpression(
coce = new CodeObjectCreateExpression();
coce.CreateType = new CodeTypeReference(PrivateNamesUsed["GeneratedClassName"].ToString());
- coce.Parameters.Add(new CodeCastExpression(new CodeTypeReference(PublicNamesUsed["LateBoundClass"].ToString()),cmie1));
+ coce.Parameters.Add(new CodeCastExpression(new CodeTypeReference(PublicNamesUsed["LateBoundClass"].ToString()), cmie1));
cmie.Parameters.Add(coce);
cmie.Parameters.Add(new CodeVariableReferenceExpression(strnCtr));
cmm.ReturnType = new CodeTypeReference("System.Collections.IEnumerator");
coce = new CodeObjectCreateExpression();
coce.CreateType = new CodeTypeReference(PrivateNamesUsed["EnumeratorClass"].ToString());
- coce.Parameters.Add(new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(strObjectCollection),"GetEnumerator"));
+ coce.Parameters.Add(new CodeMethodInvokeExpression(new CodeVariableReferenceExpression(strObjectCollection), "GetEnumerator"));
cmm.Statements.Add(new CodeMethodReturnStatement(coce));
ccc.Members.Add(cmm);
int nIndex = -1;
for (int i=0; i < sortedList.Count; i++)
{
- if (string.Equals(sortedList.GetByIndex(i).ToString(),strToFind,StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(sortedList.GetByIndex(i).ToString(), strToFind, StringComparison.OrdinalIgnoreCase))
{
//The string is found. This is the index
nIndex = i;
/// </summary>
/// <param name="cType"> </param>
/// <param name="isArray"> </param>
- private CodeTypeReference ConvertCIMType(CimType cType,bool isArray)
+ private CodeTypeReference ConvertCIMType(CimType cType, bool isArray)
{
string strType;
switch (cType)
if (isArray )
{
- return new CodeTypeReference(strType,1);
+ return new CodeTypeReference(strType, 1);
}
else
{
}
else
{
- strToAdd = new string(arrString[i],1);
+ strToAdd = new string(arrString[i], 1);
}
if (bAdd == true)
{
- strRet = string.Concat(strRet,strToAdd);
+ strRet = string.Concat(strRet, strToAdd);
}
}
return strRet;
/// This function goes thru the names in array list and resolves any duplicates
/// if any so that these names can be added as values of enum
/// </summary>
- private void ResolveEnumNameValues(ArrayList arrIn,ref ArrayList arrayOut)
+ private void ResolveEnumNameValues(ArrayList arrIn, ref ArrayList arrayOut)
{
arrayOut.Clear();
int nCurIndex = 0;
for ( int i = 0 ; i < arrIn.Count ; i++)
{
strToAdd = arrIn[i].ToString();
- strToAdd = ResolveCollision(strToAdd,true);
+ strToAdd = ResolveCollision(strToAdd, true);
if (true == IsContainedInArray(strToAdd, arrayOut))
{
nCurIndex = 0;
strToAdd = arrIn[i].ToString() + nCurIndex.ToString(formatProv);
- while (true == IsContainedInArray(strToAdd,arrayOut))
+ while (true == IsContainedInArray(strToAdd, arrayOut))
{
nCurIndex++;
strToAdd = arrIn[i].ToString() + nCurIndex.ToString(formatProv);
{
for (int i=0; i < arrToSearch.Count; i++)
{
- if (string.Equals(arrToSearch[i].ToString(),strToFind,StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(arrToSearch[i].ToString(), strToFind, StringComparison.OrdinalIgnoreCase))
{
return true;
}
}
catch
{
- throw new ArgumentOutOfRangeException(SR.Format(SR.UnableToCreateCodeGeneratorException , strProvider ));
+ throw new ArgumentOutOfRangeException(SR.Format(SR.UnableToCreateCodeGeneratorException, strProvider ));
}
if (bSucceeded == true)
}
else
{
- throw new ArgumentOutOfRangeException(SR.Format(SR.UnableToCreateCodeGeneratorException , strProvider));
+ throw new ArgumentOutOfRangeException(SR.Format(SR.UnableToCreateCodeGeneratorException, strProvider));
}
return true;
}
{
strTemp = strTemp + arrString[i];
}
- ret = System.Convert.ToInt32(strTemp,(IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(int)));
+ ret = System.Convert.ToInt32(strTemp, (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(int)));
}
else
{
- ret = System.Convert.ToInt32(bitMap,(IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(int)));
+ ret = System.Convert.ToInt32(bitMap, (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(int)));
}
return ret;
/// </summary>
private static bool IsDesignerSerializationVisibilityToBeSet(string propName)
{
- if (!string.Equals(propName,"Path",StringComparison.OrdinalIgnoreCase))
+ if (!string.Equals(propName, "Path", StringComparison.OrdinalIgnoreCase))
{
return true;
}
bool ret = false;
try
{
- ret = System.Convert.ToBoolean(classobj.Qualifiers["dynamic"].Value,(IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(bool)));
+ ret = System.Convert.ToBoolean(classobj.Qualifiers["dynamic"].Value, (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(bool)));
}
catch (ManagementException)
{
/// <summary>
/// Converts a numberic value to appropriate type and adds it to array
/// </summary>
- private static string ConvertToNumericValueAndAddToArray(CimType cimType, string numericValue,ArrayList arrayToAdd,out string enumType)
+ private static string ConvertToNumericValueAndAddToArray(CimType cimType, string numericValue, ArrayList arrayToAdd, out string enumType)
{
string retFunctionName = string.Empty;
enumType = string.Empty;
case CimType.UInt16:
case CimType.SInt32:
case CimType.UInt32:
- arrayToAdd.Add(System.Convert.ToInt32(numericValue,(IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(int))));
+ arrayToAdd.Add(System.Convert.ToInt32(numericValue, (IFormatProvider)CultureInfo.InvariantCulture.GetFormat(typeof(int))));
retFunctionName = "ToInt32";
enumType = "System.Int32";
break;
cmp.CustomAttributes.Add(cad);
caa = new CodeAttributeArgument();
- caa.Value = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DesignerSerializationVisibility"),"Hidden");
+ caa.Value = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DesignerSerializationVisibility"), "Hidden");
cad = new CodeAttributeDeclaration();
cad.Name = "DesignerSerializationVisibility";
cad.Arguments.Add(caa);
cmp.CustomAttributes.Add(cad);
- cmp.GetStatements.Add (new CodeVariableDeclarationStatement("System.String",strRetVar,
+ cmp.GetStatements.Add (new CodeVariableDeclarationStatement("System.String", strRetVar,
new CodeVariableReferenceExpression(PrivateNamesUsed["CreationClassName"].ToString())));
CodeBinaryOperatorExpression cboe4 = new CodeBinaryOperatorExpression();
cboe4.Left = new CodeVariableReferenceExpression(strRetVar);
- cboe4.Right = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.String"),"Empty");
+ cboe4.Right = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.String"), "Empty");
cboe4.Operator = CodeBinaryOperatorType.IdentityEquality;
CodeBinaryOperatorExpression cboe5 = new CodeBinaryOperatorExpression();
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.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()),strPathParam));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["GetOptionsClass"].ToString()),strGetOptions));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString()), PrivateNamesUsed["ScopeParam"].ToString()));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()), strPathParam));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["GetOptionsClass"].ToString()), strGetOptions));
CodeExpression[] parms = new CodeExpression[]
{
- new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strPathParam),"ClassName"),
+ new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strPathParam), "ClassName"),
// new CodeVariableReferenceExpression(PublicNamesUsed["ClassNameProperty"].ToString()),
- new CodePropertyReferenceExpression(new CodeThisReferenceExpression(),PublicNamesUsed["ClassNameProperty"].ToString()),
+ new CodePropertyReferenceExpression(new CodeThisReferenceExpression(), PublicNamesUsed["ClassNameProperty"].ToString()),
new CodePrimitiveExpression(true),
- new CodePropertyReferenceExpression(new CodeTypeReferenceExpression("System.Globalization.CultureInfo"),"InvariantCulture")
+ new CodePropertyReferenceExpression(new CodeTypeReferenceExpression("System.Globalization.CultureInfo"), "InvariantCulture")
};
cmie = new CodeMethodInvokeExpression(
CodeMethodReferenceExpression cmre = new CodeMethodReferenceExpression();
cmre.MethodName = PrivateNamesUsed["ClassNameCheckFunc"].ToString();
- cis.FalseStatements.Add(new CodeMethodReturnStatement(new CodeMethodInvokeExpression(cmre,coce)));
+ cis.FalseStatements.Add(new CodeMethodReturnStatement(new CodeMethodInvokeExpression(cmre, coce)));
cmm.Statements.Add(cis);
cc.Members.Add(cmm);
cmm.Attributes = MemberAttributes.Private | MemberAttributes.Final ;
cmm.ReturnType = new CodeTypeReference("System.Boolean");
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["BaseObjClass"].ToString()),strTempObj));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(PublicNamesUsed["BaseObjClass"].ToString()), strTempObj));
CodeExpression[] parms = new CodeExpression[]
{
new CodePrimitiveExpression("__CLASS"))),
new CodePropertyReferenceExpression(new CodeThisReferenceExpression(), PublicNamesUsed["ClassNameProperty"].ToString()),
new CodePrimitiveExpression(true),
- new CodePropertyReferenceExpression(new CodeTypeReferenceExpression("System.Globalization.CultureInfo"),"InvariantCulture")
+ new CodePropertyReferenceExpression(new CodeTypeReferenceExpression("System.Globalization.CultureInfo"), "InvariantCulture")
};
cmie = new CodeMethodInvokeExpression(
new CodePrimitiveExpression("__DERIVATION")));
- cis.FalseStatements.Add(new CodeVariableDeclarationStatement("System.Array",strDerivation,cs));
+ cis.FalseStatements.Add(new CodeVariableDeclarationStatement("System.Array", strDerivation, cs));
CodeConditionStatement cis1 = new CodeConditionStatement();
cboe = new CodeBinaryOperatorExpression();
cfls = new CodeIterationStatement();
- cis1.TrueStatements.Add(new CodeVariableDeclarationStatement("System.Int32",strnCtr,new CodePrimitiveExpression(0)));
- cfls.InitStatement = new CodeAssignStatement(new CodeVariableReferenceExpression(strnCtr),new CodePrimitiveExpression(0));
+ cis1.TrueStatements.Add(new CodeVariableDeclarationStatement("System.Int32", strnCtr, new CodePrimitiveExpression(0)));
+ cfls.InitStatement = new CodeAssignStatement(new CodeVariableReferenceExpression(strnCtr), new CodePrimitiveExpression(0));
cboe = new CodeBinaryOperatorExpression();
cboe.Left = new CodeVariableReferenceExpression(strnCtr);
cboe.Operator = CodeBinaryOperatorType.LessThan;
- cboe.Right = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strDerivation),"Length");
+ cboe.Right = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strDerivation), "Length");
cfls.TestExpression = cboe;
cfls.IncrementStatement = new CodeAssignStatement(new CodeVariableReferenceExpression(strnCtr),
new CodeBinaryOperatorExpression(
CodeExpression[] parms1 = new CodeExpression[]
{
- new CodeCastExpression(new CodeTypeReference("System.String"),cmie1),
+ new CodeCastExpression(new CodeTypeReference("System.String"), cmie1),
new CodePropertyReferenceExpression(new CodeThisReferenceExpression(), PublicNamesUsed["ClassNameProperty"].ToString()),
new CodePrimitiveExpression(true),
- new CodePropertyReferenceExpression(new CodeTypeReferenceExpression("System.Globalization.CultureInfo"),"InvariantCulture")
+ new CodePropertyReferenceExpression(new CodeTypeReferenceExpression("System.Globalization.CultureInfo"), "InvariantCulture")
};
CodeMethodInvokeExpression cmie2 = new CodeMethodInvokeExpression(new CodeTypeReferenceExpression("System.String"),
/// Generates code for Property Get for Cimtype.Reference and CimType.DateTime type property
/// Also generated code to initialize a variable after converting a property to DateTime and ManagementPathProperty
/// </summary>
- private void GenerateCodeForRefAndDateTimeTypes(CodeIndexerExpression prop,bool bArray,CodeStatementCollection statColl,string strType,CodeVariableReferenceExpression varToAssign,bool bIsValueProprequired)
+ private void GenerateCodeForRefAndDateTimeTypes(CodeIndexerExpression prop, bool bArray, CodeStatementCollection statColl, string strType, CodeVariableReferenceExpression varToAssign, bool bIsValueProprequired)
{
if (bArray == false)
// if the type is string then check for null is to be done
// otherwise, the DateTime Conversion function will do for DateTime types
- if (string.Equals(strType,PublicNamesUsed["PathClass"].ToString(),StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(strType, PublicNamesUsed["PathClass"].ToString(), StringComparison.OrdinalIgnoreCase))
{
CodeMethodReferenceExpression cmre = new CodeMethodReferenceExpression();
cmre.MethodName = "ToString";
if (varToAssign == null)
{
- cis1.TrueStatements.Add (new CodeMethodReturnStatement(CreateObjectForProperty(strType,cmie)));
+ cis1.TrueStatements.Add (new CodeMethodReturnStatement(CreateObjectForProperty(strType, cmie)));
statColl.Add(cis1);
statColl.Add (new CodeMethodReturnStatement(new CodePrimitiveExpression(null)));
}
else
{
// Assign null to variable
- statColl.Add(new CodeAssignStatement(varToAssign,new CodePrimitiveExpression(null)));
- cis1.TrueStatements.Add (new CodeAssignStatement(varToAssign ,CreateObjectForProperty(strType,cmie)));
+ statColl.Add(new CodeAssignStatement(varToAssign, new CodePrimitiveExpression(null)));
+ cis1.TrueStatements.Add (new CodeAssignStatement(varToAssign, CreateObjectForProperty(strType, cmie)));
statColl.Add(cis1);
}
}
CodeExpression ce = null;
if (bIsValueProprequired)
{
- ce = new CodeCastExpression(new CodeTypeReference("System.String"),new CodePropertyReferenceExpression(prop,"Value"));
+ ce = new CodeCastExpression(new CodeTypeReference("System.String"), new CodePropertyReferenceExpression(prop, "Value"));
}
else
{
- ce = new CodeCastExpression(new CodeTypeReference("System.String"),prop);
+ ce = new CodeCastExpression(new CodeTypeReference("System.String"), prop);
}
if (varToAssign == null)
{
- cis1.TrueStatements.Add(new CodeMethodReturnStatement(CreateObjectForProperty(strType,ce)));
- cis1.FalseStatements.Add(new CodeMethodReturnStatement(CreateObjectForProperty(strType,null)));
+ cis1.TrueStatements.Add(new CodeMethodReturnStatement(CreateObjectForProperty(strType, ce)));
+ cis1.FalseStatements.Add(new CodeMethodReturnStatement(CreateObjectForProperty(strType, null)));
}
else
{
- cis1.TrueStatements.Add(new CodeAssignStatement(varToAssign,CreateObjectForProperty(strType,ce)));
- cis1.FalseStatements.Add(new CodeAssignStatement(varToAssign,CreateObjectForProperty(strType,null)));
+ cis1.TrueStatements.Add(new CodeAssignStatement(varToAssign, CreateObjectForProperty(strType, ce)));
+ cis1.FalseStatements.Add(new CodeAssignStatement(varToAssign, CreateObjectForProperty(strType, null)));
}
}
LenProp = new CodePropertyReferenceExpression(
new CodeCastExpression(
new CodeTypeReference("System.Array"),
- new CodePropertyReferenceExpression(prop,"Value")
+ new CodePropertyReferenceExpression(prop, "Value")
),
"Length"
);
cmie1.Method.MethodName = "GetValue";
if (bIsValueProprequired == true)
{
- cmie1.Method.TargetObject = new CodeCastExpression(new CodeTypeReference("System.Array"),new CodePropertyReferenceExpression(prop,"Value"));
+ cmie1.Method.TargetObject = new CodeCastExpression(new CodeTypeReference("System.Array"), new CodePropertyReferenceExpression(prop, "Value"));
}
else
{
cmie2.Method.TargetObject = cmie1;
cfls.Statements.Add( new CodeAssignStatement(new CodeIndexerExpression(new CodeVariableReferenceExpression(strArray),
- new CodeVariableReferenceExpression(strnCtr)),CreateObjectForProperty(strType,cmie2)));
+ new CodeVariableReferenceExpression(strnCtr)), CreateObjectForProperty(strType, cmie2)));
cis1.TrueStatements.Add(cfls);
if (varToAssign == null)
else
{
// Assign null to variable
- statColl.Add(new CodeAssignStatement(varToAssign,new CodePrimitiveExpression(null)));
- cis1.TrueStatements.Add(new CodeAssignStatement(varToAssign ,new CodeVariableReferenceExpression(strArray)));
+ statColl.Add(new CodeAssignStatement(varToAssign, new CodePrimitiveExpression(null)));
+ cis1.TrueStatements.Add(new CodeAssignStatement(varToAssign, new CodeVariableReferenceExpression(strArray)));
statColl.Add (cis1);
}
/// <summary>
/// Generates code for Property Set for Cimtype.DateTime and CimType.Reference type property
/// </summary>
- private void AddPropertySet(CodeIndexerExpression prop,bool bArray,CodeStatementCollection statColl,string strType,CodeVariableReferenceExpression varValue)
+ private void AddPropertySet(CodeIndexerExpression prop, bool bArray, CodeStatementCollection statColl, string strType, CodeVariableReferenceExpression varValue)
{
if (varValue == null)
{
CodeMethodInvokeExpression cmie1 = new CodeMethodInvokeExpression();
cmie1.Method.MethodName = "GetValue";
- cmie1.Method.TargetObject = new CodeCastExpression(new CodeTypeReference("System.Array"),varValue);
+ cmie1.Method.TargetObject = new CodeCastExpression(new CodeTypeReference("System.Array"), varValue);
cmie1.Parameters.Add(new CodeVariableReferenceExpression(strnCtr));
cfls.Statements.Add( new CodeAssignStatement(new CodeIndexerExpression(new CodeVariableReferenceExpression(strArray),
- new CodeVariableReferenceExpression(strnCtr)),ConvertPropertyToString(strType,cmie1)));
+ new CodeVariableReferenceExpression(strnCtr)), ConvertPropertyToString(strType, cmie1)));
cis1.TrueStatements.Add(cfls);
- cis1.TrueStatements.Add(new CodeAssignStatement(prop,new CodeVariableReferenceExpression(strArray)));
- cis1.FalseStatements.Add(new CodeAssignStatement(prop,new CodePrimitiveExpression(null)));
+ cis1.TrueStatements.Add(new CodeAssignStatement(prop, new CodeVariableReferenceExpression(strArray)));
+ cis1.FalseStatements.Add(new CodeAssignStatement(prop, new CodePrimitiveExpression(null)));
statColl.Add (cis1);
}
}
case "System.DateTime" :
if (param == null)
{
- return new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.DateTime"),"MinValue");
+ return new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.DateTime"), "MinValue");
}
else
{
/// Internal function used to create code to convert DateTime or ManagementPath to String
/// convert a expression. Used in adding code for Property Set for DateTime and Reference properties
/// </summary>
- private CodeExpression ConvertPropertyToString(string strType,CodeExpression beginingExpression)
+ private CodeExpression ConvertPropertyToString(string strType, CodeExpression beginingExpression)
{
switch (strType)
{
case "System.DateTime" :
CodeMethodInvokeExpression cmie1 = new CodeMethodInvokeExpression();
- cmie1.Parameters.Add(new CodeCastExpression(new CodeTypeReference("System.DateTime"),beginingExpression));
+ cmie1.Parameters.Add(new CodeCastExpression(new CodeTypeReference("System.DateTime"), beginingExpression));
cmie1.Method.MethodName = PrivateNamesUsed["ToDMTFDateTimeMethod"].ToString();
return cmie1;
case "System.TimeSpan" :
CodeMethodInvokeExpression cmie2 = new CodeMethodInvokeExpression();
- cmie2.Parameters.Add(new CodeCastExpression(new CodeTypeReference("System.TimeSpan"),beginingExpression));
+ cmie2.Parameters.Add(new CodeCastExpression(new CodeTypeReference("System.TimeSpan"), beginingExpression));
cmie2.Method.MethodName = PrivateNamesUsed["ToDMTFTimeIntervalMethod"].ToString();
return cmie2;
case "System.Management.ManagementPath":
return new CodePropertyReferenceExpression(new CodeCastExpression(
new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()),
- beginingExpression),PublicNamesUsed["PathProperty"].ToString());
+ beginingExpression), PublicNamesUsed["PathProperty"].ToString());
}
if (IsDesignerSerializationVisibilityToBeSet(PublicNamesUsed["ScopeProperty"].ToString()))
{
caa = new CodeAttributeArgument();
- caa.Value = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DesignerSerializationVisibility"),"Hidden");
+ caa.Value = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DesignerSerializationVisibility"), "Hidden");
cad = new CodeAttributeDeclaration();
cad.Name = "DesignerSerializationVisibility";
cad.Arguments.Add(caa);
cis.Condition = cboe;
CodeExpression Value = new CodePropertyReferenceExpression(
- new CodeVariableReferenceExpression(PrivateNamesUsed["LateBoundObject"].ToString()),"Scope");
+ new CodeVariableReferenceExpression(PrivateNamesUsed["LateBoundObject"].ToString()), "Scope");
cis.TrueStatements.Add(new CodeMethodReturnStatement(Value));
cis.FalseStatements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(null)));
cmp.Comments.Add(new CodeCommentStatement(SR.CommentManagementScope));
}
- private void AddGetStatementsForEnumArray(CodeIndexerExpression ciProp,CodeMemberProperty cmProp)
+ private void AddGetStatementsForEnumArray(CodeIndexerExpression ciProp, CodeMemberProperty cmProp)
{
string strArray = "arrEnumVals";
string ArrToRet = "enumToRet";
string strEnumName = cmProp.Type.BaseType;
- cmProp.GetStatements.Add(new CodeVariableDeclarationStatement("System.Array",strArray,
- new CodeCastExpression(new CodeTypeReference("System.Array"),ciProp)));
+ cmProp.GetStatements.Add(new CodeVariableDeclarationStatement("System.Array", strArray,
+ new CodeCastExpression(new CodeTypeReference("System.Array"), ciProp)));
- cmProp.GetStatements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(strEnumName,1),ArrToRet,
+ cmProp.GetStatements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(strEnumName, 1), ArrToRet,
new CodeArrayCreateExpression(new CodeTypeReference(strEnumName),
new CodePropertyReferenceExpression(
- new CodeVariableReferenceExpression(strArray),"Length"))));
+ new CodeVariableReferenceExpression(strArray), "Length"))));
cfls = new CodeIterationStatement();
- cmProp.GetStatements.Add(new CodeVariableDeclarationStatement("System.Int32",strnCtr,new CodePrimitiveExpression(0)));
- cfls.InitStatement = new CodeAssignStatement(new CodeVariableReferenceExpression(strnCtr),new CodePrimitiveExpression(0));
+ cmProp.GetStatements.Add(new CodeVariableDeclarationStatement("System.Int32", strnCtr, new CodePrimitiveExpression(0)));
+ cfls.InitStatement = new CodeAssignStatement(new CodeVariableReferenceExpression(strnCtr), new CodePrimitiveExpression(0));
CodeBinaryOperatorExpression cboe1 = new CodeBinaryOperatorExpression();
cboe1.Left = new CodeVariableReferenceExpression(strnCtr);
cboe1.Operator = CodeBinaryOperatorType.LessThan;
- cboe1.Right = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strArray),"Length");
+ cboe1.Right = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strArray), "Length");
cfls.TestExpression = cboe1;
cfls.IncrementStatement = new CodeAssignStatement(new CodeVariableReferenceExpression(strnCtr),
new CodeBinaryOperatorExpression(
cmie2.Method.MethodName = arrConvFuncName;
cfls.Statements.Add(new CodeAssignStatement(new CodeIndexerExpression(new CodeVariableReferenceExpression(ArrToRet),
new CodeVariableReferenceExpression(strnCtr)),
- new CodeCastExpression(new CodeTypeReference(strEnumName),cmie2 )));
+ new CodeCastExpression(new CodeTypeReference(strEnumName), cmie2 )));
cmProp.GetStatements.Add(cfls);
// is "interval" then the returned CodeTypeReference is of type System.TimeSpan
// otherwise the returned type will be System.DateTime.
// This functions is called only for cimtype.DateTime type properties
- private bool GetDateTimeType(PropertyData prop,ref CodeTypeReference codeType )
+ private bool GetDateTimeType(PropertyData prop, ref CodeTypeReference codeType )
{
bool isTimeInterval = false;
codeType = null;
if (prop.IsArray)
{
- codeType = new CodeTypeReference("System.DateTime",1);
+ codeType = new CodeTypeReference("System.DateTime", 1);
}
else
{
try
{
- if (string.Equals(prop.Qualifiers["SubType"].Value.ToString() ,"interval",StringComparison.OrdinalIgnoreCase))
+ if (string.Equals(prop.Qualifiers["SubType"].Value.ToString(), "interval", StringComparison.OrdinalIgnoreCase))
{
isTimeInterval = true;
if (prop.IsArray)
{
- codeType = new CodeTypeReference("System.TimeSpan",1);
+ codeType = new CodeTypeReference("System.TimeSpan", 1);
}
else
{
coce = new CodeObjectCreateExpression();
coce.CreateType = new CodeTypeReference(PublicNamesUsed["ScopeClass"].ToString());
- cis1.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strScope),coce));
+ cis1.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strScope), coce));
cis1.TrueStatements.Add(new CodeAssignStatement(new CodePropertyReferenceExpression(
new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strScope),
- "Path"),"NamespacePath"),
+ "Path"), "NamespacePath"),
new CodeVariableReferenceExpression(PrivateNamesUsed["CreationWmiNamespace"].ToString())));
CodeObjectCreateExpression cocePath = new CodeObjectCreateExpression();
cocePath.CreateType = new CodeTypeReference(PublicNamesUsed["PathClass"].ToString());
cocePath.Parameters.Add(new CodeVariableReferenceExpression(PrivateNamesUsed["CreationClassName"].ToString()));
- cmm.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()),strPath,cocePath));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(PublicNamesUsed["PathClass"].ToString()), strPath, cocePath));
CodeObjectCreateExpression coce1 = new CodeObjectCreateExpression();
coce1.CreateType = new CodeTypeReference(PublicNamesUsed["ManagementClass"].ToString());
coce1.Parameters.Add(new CodeVariableReferenceExpression(strPath));
coce1.Parameters.Add(new CodePrimitiveExpression(null));
- cmm.Statements.Add(new CodeVariableDeclarationStatement(PublicNamesUsed["ManagementClass"].ToString(),strTemp,coce1));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement(PublicNamesUsed["ManagementClass"].ToString(), strTemp, coce1));
CodeMethodInvokeExpression cmie1 = new CodeMethodInvokeExpression();
cmmdt.Name = PrivateNamesUsed["ToDateTimeMethod"].ToString();
cmmdt.Attributes = MemberAttributes.Final | MemberAttributes.Static;
cmmdt.ReturnType = new CodeTypeReference("System.DateTime");
- cmmdt.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.String"),dmtfParam));
+ cmmdt.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.String"), dmtfParam));
cmmdt.Comments.Add(new CodeCommentStatement(SR.CommentToDateTime));
// create a local variable to initialize from - fixed warnings in MCPP which doesn't
// like you copying sub items (like year) out of MinValue
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.DateTime"),"initializer",new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.DateTime"),"MinValue")));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.DateTime"), "initializer", new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.DateTime"), "MinValue")));
CodeVariableReferenceExpression cvreInitializer = new CodeVariableReferenceExpression("initializer");
//Int32 year = initializer.Year;
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"),year,new CodePropertyReferenceExpression(cvreInitializer,"Year")));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"), year, new CodePropertyReferenceExpression(cvreInitializer, "Year")));
//Int32 month = initializer.Month;
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"),month, new CodePropertyReferenceExpression(cvreInitializer,"Month")));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"), month, new CodePropertyReferenceExpression(cvreInitializer, "Month")));
//Int32 day = initializer.Day;
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"),day,new CodePropertyReferenceExpression(cvreInitializer,"Day")));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"), day, new CodePropertyReferenceExpression(cvreInitializer, "Day")));
//Int32 hour = initializer.Hour;
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"),hour,new CodePropertyReferenceExpression(cvreInitializer,"Hour")));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"), hour, new CodePropertyReferenceExpression(cvreInitializer, "Hour")));
//Int32 minute = Sinitializer.Minute;
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"),minute,new CodePropertyReferenceExpression(cvreInitializer,"Minute")));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"), minute, new CodePropertyReferenceExpression(cvreInitializer, "Minute")));
//Int32 second = initializer.Second;
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"),second,new CodePropertyReferenceExpression(cvreInitializer,"Second")));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"), second, new CodePropertyReferenceExpression(cvreInitializer, "Second")));
//Int32 millisec = 0;
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int64"),ticks,new CodePrimitiveExpression(0)));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int64"), ticks, new CodePrimitiveExpression(0)));
//String dmtf = dmtfDate ;
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"),dmtf,new CodeVariableReferenceExpression(dmtfParam)));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"), dmtf, new CodeVariableReferenceExpression(dmtfParam)));
//System.DateTime datetime = System.DateTime.MinValue ;
- CodeFieldReferenceExpression cpreMinVal = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.DateTime"),"MinValue");
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.DateTime"),datetimeVariable,cpreMinVal));
+ CodeFieldReferenceExpression cpreMinVal = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.DateTime"), "MinValue");
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.DateTime"), datetimeVariable, cpreMinVal));
//String tempString = String.Empty ;
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"),tempStr,new CodeFieldReferenceExpression(
- new CodeTypeReferenceExpression("System.String"),"Empty")));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"), tempStr, new CodeFieldReferenceExpression(
+ new CodeTypeReferenceExpression("System.String"), "Empty")));
CodeBinaryOperatorExpression cboe = new CodeBinaryOperatorExpression();
cboe.Left = new CodeVariableReferenceExpression(dmtf);
*/
cboe = new CodeBinaryOperatorExpression();
- cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dmtf),"Length");
+ cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dmtf), "Length");
cboe.Right = new CodePrimitiveExpression(0);
cboe.Operator = CodeBinaryOperatorType.ValueEquality;
}
*/
cboe = new CodeBinaryOperatorExpression();
- cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dmtf),"Length");
+ cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dmtf), "Length");
cboe.Right = new CodePrimitiveExpression(DMTF_DATETIME_STR_LENGTH);
cboe.Operator = CodeBinaryOperatorType.IdentityInequality;
cmmdt.Statements.Add(cis);
CodeTryCatchFinallyStatement tryblock = new CodeTryCatchFinallyStatement();
- DateTimeConversionFunctionHelper(tryblock.TryStatements,"****",tempStr,dmtf,year,0,4);
- DateTimeConversionFunctionHelper(tryblock.TryStatements,"**",tempStr,dmtf,month,4,2);
- DateTimeConversionFunctionHelper(tryblock.TryStatements,"**",tempStr,dmtf,day,6,2);
- DateTimeConversionFunctionHelper(tryblock.TryStatements,"**",tempStr,dmtf,hour,8,2);
- DateTimeConversionFunctionHelper(tryblock.TryStatements,"**",tempStr,dmtf,minute,10,2);
- DateTimeConversionFunctionHelper(tryblock.TryStatements,"**",tempStr,dmtf,second,12,2);
+ DateTimeConversionFunctionHelper(tryblock.TryStatements, "****", tempStr, dmtf, year, 0, 4);
+ DateTimeConversionFunctionHelper(tryblock.TryStatements, "**", tempStr, dmtf, month, 4, 2);
+ DateTimeConversionFunctionHelper(tryblock.TryStatements, "**", tempStr, dmtf, day, 6, 2);
+ DateTimeConversionFunctionHelper(tryblock.TryStatements, "**", tempStr, dmtf, hour, 8, 2);
+ DateTimeConversionFunctionHelper(tryblock.TryStatements, "**", tempStr, dmtf, minute, 10, 2);
+ DateTimeConversionFunctionHelper(tryblock.TryStatements, "**", tempStr, dmtf, second, 12, 2);
/*
tempString = dmtf.Substring(15, 6);
}
*/
- CodeMethodReferenceExpression cmre = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(dmtf),"Substring");
+ CodeMethodReferenceExpression cmre = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(dmtf), "Substring");
CodeMethodInvokeExpression cmie = new CodeMethodInvokeExpression();
cmie.Method = cmre;
cmie.Parameters.Add(new CodePrimitiveExpression(15));
cis = new CodeConditionStatement();
cis.Condition = cboe;
- CodeMethodReferenceExpression cmre1 = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.Int64"),"Parse");
+ CodeMethodReferenceExpression cmre1 = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.Int64"), "Parse");
CodeMethodInvokeExpression cmie1 = new CodeMethodInvokeExpression();
cmie1.Method = cmre1;
cmie1.Parameters.Add(new CodeVariableReferenceExpression(tempStr));
cboe = new CodeBinaryOperatorExpression();
- cboe.Left = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"),"TicksPerMillisecond");
+ cboe.Left = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"), "TicksPerMillisecond");
cboe.Right = new CodePrimitiveExpression(1000);
cboe.Operator = CodeBinaryOperatorType.Divide;
cast = new CodeCastExpression("System.Int64", cboe);
cboe2.Right = cast;
cboe2.Operator = CodeBinaryOperatorType.Multiply;
- cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(ticks),cboe2));
+ cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(ticks), cboe2));
tryblock.TryStatements.Add(cis);
coce.Parameters.Add(new CodeVariableReferenceExpression(second));
coce.Parameters.Add(new CodePrimitiveExpression(0));
- cmmdt.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(datetimeVariable),coce));
+ cmmdt.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(datetimeVariable), coce));
/*
datetime = datetime.AddTicks(ticks);
*/
- CodeMethodReferenceExpression cmre2 = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(datetimeVariable),"AddTicks");
+ CodeMethodReferenceExpression cmre2 = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(datetimeVariable), "AddTicks");
CodeMethodInvokeExpression cmie2 = new CodeMethodInvokeExpression();
cmie2.Method = cmre2;
cmie2.Parameters.Add(new CodeVariableReferenceExpression(ticks));
- cmmdt.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(datetimeVariable),cmie2));
+ cmmdt.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(datetimeVariable), cmie2));
/*
System.TimeSpan tickOffset = System.TimeZone.CurrentTimeZone.GetUtcOffset(datetime);
*/
- cmre1 = new CodeMethodReferenceExpression(new CodePropertyReferenceExpression(new CodeTypeReferenceExpression("System.TimeZone"),"CurrentTimeZone"),
+ cmre1 = new CodeMethodReferenceExpression(new CodePropertyReferenceExpression(new CodeTypeReferenceExpression("System.TimeZone"), "CurrentTimeZone"),
"GetUtcOffset");
cmie1 = new CodeMethodInvokeExpression();
cmie1.Method = cmre1;
cmie1.Parameters.Add(new CodeVariableReferenceExpression(datetimeVariable));
string tickoffset = "tickOffset";
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.TimeSpan"),tickoffset,cmie1));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.TimeSpan"), tickoffset, cmie1));
/*
System.Int32 UTCOffset = 0;
tempString = dmtf.Substring(22, 3);
*/
string utcOffset = "UTCOffset";
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"),utcOffset,new CodePrimitiveExpression(0)));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"), utcOffset, new CodePrimitiveExpression(0)));
string offsetAdjust = "OffsetToBeAdjusted";
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"),offsetAdjust,new CodePrimitiveExpression(0)));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"), offsetAdjust, new CodePrimitiveExpression(0)));
string OffsetMins = "OffsetMins";
cboe = new CodeBinaryOperatorExpression();
- cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tickoffset),"Ticks");
- cboe.Right = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"),"TicksPerMinute");
+ cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tickoffset), "Ticks");
+ cboe.Right = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"), "TicksPerMinute");
cboe.Operator = CodeBinaryOperatorType.Divide;
cast = new CodeCastExpression("System.Int64", cboe);
cmmdt.Statements.Add(
)
);
- cmre = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(dmtf),"Substring");
+ cmre = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(dmtf), "Substring");
cmie = new CodeMethodInvokeExpression();
cmie.Method = cmre;
cmie.Parameters.Add(new CodePrimitiveExpression(22));
cis = new CodeConditionStatement();
cis.Condition = cboe;
- cmre = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(dmtf),"Substring");
+ cmre = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(dmtf), "Substring");
cmie = new CodeMethodInvokeExpression();
cmie.Method = cmre;
cmie.Parameters.Add(new CodePrimitiveExpression(21));
CodeTryCatchFinallyStatement tryblock2 = new CodeTryCatchFinallyStatement();
- cmre = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.Int32"),"Parse");
+ cmre = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.Int32"), "Parse");
cmie = new CodeMethodInvokeExpression();
cmie.Method = cmre;
cmie.Parameters.Add(new CodeVariableReferenceExpression(tempStr));
cboe.Left = new CodeVariableReferenceExpression(OffsetMins);
cboe.Right = new CodeVariableReferenceExpression(utcOffset);
cboe.Operator = CodeBinaryOperatorType.Subtract;
- cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(offsetAdjust),new CodeCastExpression(new CodeTypeReference("System.Int32"),cboe)));
+ cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(offsetAdjust), new CodeCastExpression(new CodeTypeReference("System.Int32"), cboe)));
- cmre = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(datetimeVariable),"AddMinutes");
+ cmre = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(datetimeVariable), "AddMinutes");
cmie = new CodeMethodInvokeExpression();
cmie.Method = cmre;
- cmie.Parameters.Add(new CodeCastExpression("System.Double",new CodeVariableReferenceExpression(offsetAdjust)));
- cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(datetimeVariable),cmie));
+ cmie.Parameters.Add(new CodeCastExpression("System.Double", new CodeVariableReferenceExpression(offsetAdjust)));
+ cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(datetimeVariable), cmie));
cmmdt.Statements.Add(cis);
/*
/// <summary>
/// Generates some common code used in conversion function for DateTime
/// </summary>
- private static void DateTimeConversionFunctionHelper(CodeStatementCollection cmmdt ,
+ private static void DateTimeConversionFunctionHelper(CodeStatementCollection cmmdt,
string toCompare,
string tempVarName,
string dmtfVarName,
int SubStringParam1,
int SubStringParam2)
{
- CodeMethodReferenceExpression cmre = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(dmtfVarName),"Substring");
+ CodeMethodReferenceExpression cmre = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(dmtfVarName), "Substring");
CodeMethodInvokeExpression cmie = new CodeMethodInvokeExpression();
cmie.Method = cmre;
cmie.Parameters.Add(new CodePrimitiveExpression(SubStringParam1));
CodeConditionStatement cis = new CodeConditionStatement();
cis.Condition = cboe;
- cmre = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.Int32"),"Parse");
+ cmre = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.Int32"), "Parse");
cmie = new CodeMethodInvokeExpression();
cmie.Method = cmre;
cmie.Parameters.Add(new CodeVariableReferenceExpression(tempVarName));
- cis.TrueStatements.Add( new CodeAssignStatement(new CodeVariableReferenceExpression(toAssign),cmie));
+ cis.TrueStatements.Add( new CodeAssignStatement(new CodeVariableReferenceExpression(toAssign), cmie));
cmmdt.Add(cis);
}
cmmts.Name = PrivateNamesUsed["ToDMTFTimeIntervalMethod"].ToString();
cmmts.Attributes = MemberAttributes.Final | MemberAttributes.Static;
cmmts.ReturnType = new CodeTypeReference("System.String");
- cmmts.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.TimeSpan"),timespan));
+ cmmts.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.TimeSpan"), timespan));
cmmts.Comments.Add(new CodeCommentStatement(SR.CommentToDmtfTimeInterval));
/*
CodePropertyReferenceExpression cpre1 =
new CodePropertyReferenceExpression(
- new CodeVariableReferenceExpression(timespan),"Days"
+ new CodeVariableReferenceExpression(timespan), "Days"
);
cmie = new CodeMethodInvokeExpression();
cmie.Method =
);
CodeMethodInvokeExpression cmie1 = new CodeMethodInvokeExpression();
- cmie1.Method = new CodeMethodReferenceExpression(cmie,"PadLeft");
+ cmie1.Method = new CodeMethodReferenceExpression(cmie, "PadLeft");
cmie1.Parameters.Add(new CodePrimitiveExpression(8));
cmie1.Parameters.Add(new CodePrimitiveExpression('0'));
throw new System.ArgumentOutOfRangeException();
}
*/
- CodeFieldReferenceExpression cpreMaxVal = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"),"MaxValue");
- cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.TimeSpan"),"maxTimeSpan",cpreMaxVal));
+ CodeFieldReferenceExpression cpreMaxVal = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"), "MaxValue");
+ cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.TimeSpan"), "maxTimeSpan", cpreMaxVal));
CodeBinaryOperatorExpression cboe = new CodeBinaryOperatorExpression();
throw new System.ArgumentOutOfRangeException();
}
*/
- CodeFieldReferenceExpression cpreMinVal = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"),"MinValue");
- cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.TimeSpan"),"minTimeSpan",cpreMinVal));
+ CodeFieldReferenceExpression cpreMinVal = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"), "MinValue");
+ cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.TimeSpan"), "minTimeSpan", cpreMinVal));
CodeBinaryOperatorExpression cboe3 = new CodeBinaryOperatorExpression();
dmtftimespan = (dmtftimespan + timespan.Hours.ToString().PadLeft(2, '0'));
*/
- cpre1 = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan),"Hours");
+ cpre1 = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan), "Hours");
cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int32 "),cpre1),"ToString");
+ cmie.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int32 "), cpre1), "ToString");
cmie1 = new CodeMethodInvokeExpression();
- cmie1.Method = new CodeMethodReferenceExpression(cmie,"PadLeft");
+ cmie1.Method = new CodeMethodReferenceExpression(cmie, "PadLeft");
cmie1.Parameters.Add(new CodePrimitiveExpression(2));
cmie1.Parameters.Add(new CodePrimitiveExpression('0'));
- CodeMethodInvokeExpression cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfTimeSpan),cmie1);
+ CodeMethodInvokeExpression cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfTimeSpan), cmie1);
- cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfTimeSpan),cmie2));
+ cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfTimeSpan), cmie2));
/*
dmtftimespan = (dmtftimespan + timespan.Minutes.ToString().PadLeft(2, '0'));
*/
- cpre1 = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan),"Minutes");
+ cpre1 = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan), "Minutes");
cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int32 "),cpre1),"ToString");
+ cmie.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int32 "), cpre1), "ToString");
cmie1 = new CodeMethodInvokeExpression();
- cmie1.Method = new CodeMethodReferenceExpression(cmie,"PadLeft");
+ cmie1.Method = new CodeMethodReferenceExpression(cmie, "PadLeft");
cmie1.Parameters.Add(new CodePrimitiveExpression(2));
cmie1.Parameters.Add(new CodePrimitiveExpression('0'));
- cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfTimeSpan),cmie1);
+ cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfTimeSpan), cmie1);
- cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfTimeSpan),cmie2));
+ cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfTimeSpan), cmie2));
/*
dmtftimespan = (dmtftimespan + timespan.Seconds.ToString().PadLeft(2, '0'));
*/
- cpre1 = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan),"Seconds");
+ cpre1 = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan), "Seconds");
cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int32 "),cpre1),"ToString");
+ cmie.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int32 "), cpre1), "ToString");
cmie1 = new CodeMethodInvokeExpression();
- cmie1.Method = new CodeMethodReferenceExpression(cmie,"PadLeft");
+ cmie1.Method = new CodeMethodReferenceExpression(cmie, "PadLeft");
cmie1.Parameters.Add(new CodePrimitiveExpression(2));
cmie1.Parameters.Add(new CodePrimitiveExpression('0'));
- cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfTimeSpan),cmie1);
+ cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfTimeSpan), cmie1);
- cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfTimeSpan),cmie2));
+ cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfTimeSpan), cmie2));
/*
dmtftimespan = dmtftimespan + ".";
*/
- cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfTimeSpan),new CodePrimitiveExpression("."));
+ cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfTimeSpan), new CodePrimitiveExpression("."));
- cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfTimeSpan),cmie2));
+ cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfTimeSpan), cmie2));
/*
TimeSpan tsTemp = new TimeSpan(timespan.Days ,timespan.Hours,timespan.Minutes ,timespan.Seconds ,0);
*/
coce = new CodeObjectCreateExpression();
coce.CreateType = new CodeTypeReference("System.TimeSpan");
- coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan),"Days"));
- coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan),"Hours"));
- coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan),"Minutes"));
- coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan),"Seconds"));
+ coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan), "Days"));
+ coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan), "Hours"));
+ coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan), "Minutes"));
+ coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan), "Seconds"));
coce.Parameters.Add(new CodePrimitiveExpression(0));
- cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.TimeSpan"),tsTemp,coce));
+ cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.TimeSpan"), tsTemp, coce));
/*
System.Int64 microsec = ((timespan.Ticks-tsTemp.Ticks) * 1000) / System.TimeSpan.TicksPerMillisecond;
*/
cboe = new CodeBinaryOperatorExpression();
- cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan),"Ticks");
- cboe.Right = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tsTemp),"Ticks");
+ cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(timespan), "Ticks");
+ cboe.Right = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tsTemp), "Ticks");
cboe.Operator = CodeBinaryOperatorType.Subtract;
CodeBinaryOperatorExpression cboe1 = new CodeBinaryOperatorExpression();
System.String strMicrosec = microsec.ToString();
*/
cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int64 "),new CodeVariableReferenceExpression(microsec)),"ToString");
- cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"),strmicrosec,cmie));
+ cmie.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int64 "), new CodeVariableReferenceExpression(microsec)), "ToString");
+ cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"), strmicrosec, cmie));
/*
if (strMicrosec.Length > 6)
}
*/
cboe = new CodeBinaryOperatorExpression();
- cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strmicrosec),"Length");
+ cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strmicrosec), "Length");
cboe.Right = new CodePrimitiveExpression(6);
cboe.Operator = CodeBinaryOperatorType.GreaterThan;
cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(strmicrosec),"Substring");
+ cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(strmicrosec), "Substring");
cmie.Parameters.Add(new CodePrimitiveExpression(0));
cmie.Parameters.Add(new CodePrimitiveExpression(6));
- cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strmicrosec),cmie));
+ cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strmicrosec), cmie));
cmmts.Statements.Add(cis);
/*
*/
cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(strmicrosec),"PadLeft");
+ cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(strmicrosec), "PadLeft");
cmie.Parameters.Add(new CodePrimitiveExpression(6));
cmie.Parameters.Add(new CodePrimitiveExpression('0'));
- cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfTimeSpan),cmie);
+ cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfTimeSpan), cmie);
- cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfTimeSpan),cmie2));
+ cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfTimeSpan), cmie2));
- cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfTimeSpan),new CodePrimitiveExpression(":000"));
+ cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfTimeSpan), new CodePrimitiveExpression(":000"));
- cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfTimeSpan),cmie2));
+ cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfTimeSpan), cmie2));
cmmts.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression(dmtfTimeSpan)));
cmmdt.Name = PrivateNamesUsed["ToDMTFDateTimeMethod"].ToString();
cmmdt.Attributes = MemberAttributes.Final | MemberAttributes.Static;
cmmdt.ReturnType = new CodeTypeReference("System.String");
- cmmdt.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.DateTime"),dateParam));
+ cmmdt.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.DateTime"), dateParam));
cmmdt.Comments.Add(new CodeCommentStatement(SR.CommentToDmtfDateTime));
/*
string UtcString = String.Empty;
*/
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"),strUtc,
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.String"),"Empty")));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"), strUtc,
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.String"), "Empty")));
/*
System.TimeSpan tickOffset = System.TimeZone.CurrentTimeZone.GetUtcOffset(date);
long OffsetMins = tickOffset.Ticks / System.TimeSpan.TicksPerMinute;
string OffsetMins = "OffsetMins";
cboe = new CodeBinaryOperatorExpression();
- cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tickoffset),"Ticks");
- cboe.Right = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"),"TicksPerMinute");
+ cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tickoffset), "Ticks");
+ cboe.Right = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"), "TicksPerMinute");
cboe.Operator = CodeBinaryOperatorType.Divide;
cast = new CodeCastExpression("System.Int64", cboe);
cmmdt.Statements.Add(
}
*/
- cmre = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.Math"),"Abs");
+ cmre = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.Math"), "Abs");
cmie1 = new CodeMethodInvokeExpression();
cmie1.Method = cmre;
cmie1.Parameters.Add(new CodeVariableReferenceExpression(OffsetMins));
CodeConditionStatement cis1 = new CodeConditionStatement();
cis1.Condition = cboe;
- cmre = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(dateParam),"ToUniversalTime");
+ cmre = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(dateParam), "ToUniversalTime");
cmie1 = new CodeMethodInvokeExpression();
cmie1.Method = cmre;
- cis1.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dateParam),cmie1));
- cis1.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strUtc),new CodePrimitiveExpression("+000")));
+ cis1.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dateParam), cmie1));
+ cis1.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strUtc), new CodePrimitiveExpression("+000")));
/*
else
if ((tickOffset.Ticks >= 0))
}
*/
CodeBinaryOperatorExpression cboe1 = new CodeBinaryOperatorExpression();
- cboe1.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tickoffset),"Ticks");
+ cboe1.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tickoffset), "Ticks");
cboe1.Right = new CodePrimitiveExpression(0);
cboe1.Operator = CodeBinaryOperatorType.GreaterThanOrEqual;
cis2.Condition = cboe1;
CodeBinaryOperatorExpression cboe2 = new CodeBinaryOperatorExpression();
- cboe2.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tickoffset),"Ticks");
- cboe2.Right = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"),"TicksPerMinute");
+ cboe2.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tickoffset), "Ticks");
+ cboe2.Right = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"), "TicksPerMinute");
cboe2.Operator = CodeBinaryOperatorType.Divide;
cmie1 = new CodeMethodInvokeExpression();
- cmie1.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int64 "),cboe2),"ToString");
+ cmie1.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int64 "), cboe2), "ToString");
CodeMethodInvokeExpression cmie2 = new CodeMethodInvokeExpression();
- cmie2.Method = new CodeMethodReferenceExpression(cmie1,"PadLeft");
+ cmie2.Method = new CodeMethodReferenceExpression(cmie1, "PadLeft");
cmie2.Parameters.Add(new CodePrimitiveExpression(3));
cmie2.Parameters.Add(new CodePrimitiveExpression('0'));
cis2.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strUtc),
- GenerateConcatStrings(new CodePrimitiveExpression("+"),cmie2)));
+ GenerateConcatStrings(new CodePrimitiveExpression("+"), cmie2)));
/*
else
{
*/
cmie1 = new CodeMethodInvokeExpression();
- cmie1.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int64 "),new CodeVariableReferenceExpression(OffsetMins)),"ToString");
- cis2.FalseStatements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"),"strTemp",cmie1));
+ cmie1.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int64 "), new CodeVariableReferenceExpression(OffsetMins)), "ToString");
+ cis2.FalseStatements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"), "strTemp", cmie1));
cmie2 = new CodeMethodInvokeExpression();
- cmie2.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression("strTemp"),"Substring");
+ cmie2.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression("strTemp"), "Substring");
cmie2.Parameters.Add(new CodePrimitiveExpression(1));
- cmie2.Parameters.Add(new CodeBinaryOperatorExpression(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression("strTemp"),"Length"),
+ cmie2.Parameters.Add(new CodeBinaryOperatorExpression(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression("strTemp"), "Length"),
CodeBinaryOperatorType.Subtract,
new CodePrimitiveExpression(1)));
CodeMethodInvokeExpression cmie3 = new CodeMethodInvokeExpression();
- cmie3.Method = new CodeMethodReferenceExpression(cmie2,"PadLeft");
+ cmie3.Method = new CodeMethodReferenceExpression(cmie2, "PadLeft");
cmie3.Parameters.Add(new CodePrimitiveExpression(3));
cmie3.Parameters.Add(new CodePrimitiveExpression('0'));
cis2.FalseStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strUtc),
- GenerateConcatStrings(new CodePrimitiveExpression("-"),cmie3)));
+ GenerateConcatStrings(new CodePrimitiveExpression("-"), cmie3)));
cis1.FalseStatements.Add(cis2);
cmmdt.Statements.Add(cis1);
cmie1 = new CodeMethodInvokeExpression();
cmie1.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int32 "),
new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam),
- "Year")),"ToString");
+ "Year")), "ToString");
cmie2 = new CodeMethodInvokeExpression();
- cmie2.Method = new CodeMethodReferenceExpression(cmie1,"PadLeft");
+ cmie2.Method = new CodeMethodReferenceExpression(cmie1, "PadLeft");
cmie2.Parameters.Add(new CodePrimitiveExpression(4));
cmie2.Parameters.Add(new CodePrimitiveExpression('0'));
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"),dmtfDateTime,cmie2));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"), dmtfDateTime, cmie2));
/*
dmtfDateTime = (dmtfDateTime + date.Month.ToString().PadLeft(2, '0'));
*/
- ToDMTFDateHelper("Month",cmmdt,"System.Int32 ");
+ ToDMTFDateHelper("Month", cmmdt, "System.Int32 ");
/*
dmtfDateTime = (dmtfDateTime + date.Day.ToString().PadLeft(2, '0'));
*/
- ToDMTFDateHelper("Day",cmmdt,"System.Int32 ");
+ ToDMTFDateHelper("Day", cmmdt, "System.Int32 ");
/*
dmtfDateTime = (dmtfDateTime + date.Hour.ToString().PadLeft(2, '0'));
*/
- ToDMTFDateHelper("Hour",cmmdt,"System.Int32 ");
+ ToDMTFDateHelper("Hour", cmmdt, "System.Int32 ");
/*
dmtfDateTime = (dmtfDateTime + date.Minute.ToString().PadLeft(2, '0'));
*/
- ToDMTFDateHelper("Minute",cmmdt,"System.Int32 ");
+ ToDMTFDateHelper("Minute", cmmdt, "System.Int32 ");
/*
dmtfDateTime = (dmtfDateTime + date.Second.ToString().PadLeft(2, '0'));
*/
- ToDMTFDateHelper("Second",cmmdt,"System.Int32 ");
+ ToDMTFDateHelper("Second", cmmdt, "System.Int32 ");
/*
dmtfDateTime = (dmtfDateTime + ".");
*/
cmmdt.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfDateTime),
- GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfDateTime),new CodePrimitiveExpression("."))));
+ GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfDateTime), new CodePrimitiveExpression("."))));
/*
DateTime dtTemp = new DateTime(date.Year ,date.Month,date.Day ,date.Hour ,date.Minute ,date.Second,0);
*/
string dtTemp = "dtTemp";
coce = new CodeObjectCreateExpression();
coce.CreateType = new CodeTypeReference("System.DateTime");
- coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam),"Year"));
- coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam),"Month"));
- coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam),"Day"));
- coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam),"Hour"));
- coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam),"Minute"));
- coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam),"Second"));
+ coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam), "Year"));
+ coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam), "Month"));
+ coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam), "Day"));
+ coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam), "Hour"));
+ coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam), "Minute"));
+ coce.Parameters.Add(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam), "Second"));
coce.Parameters.Add(new CodePrimitiveExpression(0));
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.DateTime"),dtTemp,coce));
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.DateTime"), dtTemp, coce));
/*
System.Int64 microsec = ((date.Ticks-dtTemp.Ticks) * 1000) / System.TimeSpan.TicksPerMillisecond;
string microsec = "microsec";
cboe = new CodeBinaryOperatorExpression();
- cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam),"Ticks");
- cboe.Right = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dtTemp),"Ticks");
+ cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam), "Ticks");
+ cboe.Right = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dtTemp), "Ticks");
cboe.Operator = CodeBinaryOperatorType.Subtract;
cboe1 = new CodeBinaryOperatorExpression();
cboe2 = new CodeBinaryOperatorExpression();
cboe2.Left = cboe1;
- cboe2.Right = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"),"TicksPerMillisecond");
+ cboe2.Right = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"), "TicksPerMillisecond");
cboe2.Operator = CodeBinaryOperatorType.Divide;
cast = new CodeCastExpression("System.Int64", cboe2);
cmmdt.Statements.Add(
string strmicrosec = "strMicrosec";
cmie1 = new CodeMethodInvokeExpression();
cmie1.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference("System.Int64 "),
- new CodeVariableReferenceExpression(microsec)),"ToString");
- cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"),strmicrosec,cmie1));
+ new CodeVariableReferenceExpression(microsec)), "ToString");
+ cmmdt.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"), strmicrosec, cmie1));
/*
if (strMicrosec.Length > 6)
}
*/
cboe = new CodeBinaryOperatorExpression();
- cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strmicrosec),"Length");
+ cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(strmicrosec), "Length");
cboe.Right = new CodePrimitiveExpression(6);
cboe.Operator = CodeBinaryOperatorType.GreaterThan;
cmie1 = new CodeMethodInvokeExpression();
- cmie1.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(strmicrosec),"Substring");
+ cmie1.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(strmicrosec), "Substring");
cmie1.Parameters.Add(new CodePrimitiveExpression(0));
cmie1.Parameters.Add(new CodePrimitiveExpression(6));
- cis1.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strmicrosec),cmie1));
+ cis1.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strmicrosec), cmie1));
cmmdt.Statements.Add(cis1);
/*
*/
cmie1 = new CodeMethodInvokeExpression();
- cmie1.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(strmicrosec),"PadLeft");
+ cmie1.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(strmicrosec), "PadLeft");
cmie1.Parameters.Add(new CodePrimitiveExpression(6));
cmie1.Parameters.Add(new CodePrimitiveExpression('0'));
- cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfDateTime),cmie1);
- cmmdt.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfDateTime),cmie2));
+ cmie2 = GenerateConcatStrings(new CodeVariableReferenceExpression(dmtfDateTime), cmie1);
+ cmmdt.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(dmtfDateTime), cmie2));
/*
}
// Helper function exclusively added to be used from AddToDMTFFunction function
- private void ToDMTFDateHelper(string dateTimeMember,CodeMemberMethod cmmdt,string strType)
+ private void ToDMTFDateHelper(string dateTimeMember, CodeMemberMethod cmmdt, string strType)
{
string dmtfDateTime = "dmtfDateTime";
string dateParam = "date";
CodeMethodInvokeExpression cmie = new CodeMethodInvokeExpression();
cmie.Method = new CodeMethodReferenceExpression(new CodeCastExpression(new CodeTypeReference(strType),
new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(dateParam),
- dateTimeMember)),"ToString");
+ dateTimeMember)), "ToString");
CodeMethodInvokeExpression cmie2 = new CodeMethodInvokeExpression();
- cmie2.Method = new CodeMethodReferenceExpression(cmie,"PadLeft");
+ cmie2.Method = new CodeMethodReferenceExpression(cmie, "PadLeft");
cmie2.Parameters.Add(new CodePrimitiveExpression(2));
cmie2.Parameters.Add(new CodePrimitiveExpression('0'));
- CodeMethodInvokeExpression cmie3 = GenerateConcatStrings(cmie,cmie2);
+ CodeMethodInvokeExpression cmie3 = GenerateConcatStrings(cmie, cmie2);
/* new CodeMethodInvokeExpression();
cmie3.Method = new CodeMethodReferenceExpression(cmie,"Concat");
cmie3.Parameters.Add(cmie2); */
cmmts.Name = PrivateNamesUsed["ToTimeSpanMethod"].ToString();
cmmts.Attributes = MemberAttributes.Final | MemberAttributes.Static;
cmmts.ReturnType = new CodeTypeReference("System.TimeSpan");
- cmmts.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.String"),tsParam));
+ cmmts.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.String"), tsParam));
cmmts.Comments.Add(new CodeCommentStatement(SR.CommentToTimeSpan));
//Int32 days = 0;
- cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"),days,new CodePrimitiveExpression(0)));
+ cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"), days, new CodePrimitiveExpression(0)));
//Int32 hours = 0;
- cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"),hours,new CodePrimitiveExpression(0)));
+ cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"), hours, new CodePrimitiveExpression(0)));
//Int32 minutes = 0;
- cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"),minutes,new CodePrimitiveExpression(0)));
+ cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"), minutes, new CodePrimitiveExpression(0)));
//Int32 seconds = 0;
- cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"),seconds,new CodePrimitiveExpression(0)));
+ cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int32"), seconds, new CodePrimitiveExpression(0)));
//Int32 ticks = 0;
- cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int64"),ticks,new CodePrimitiveExpression(0)));
+ cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.Int64"), ticks, new CodePrimitiveExpression(0)));
/*
if (dmtfTimespan == null)
*/
cboe = new CodeBinaryOperatorExpression();
- cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tsParam),"Length");
+ cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tsParam), "Length");
cboe.Right = new CodePrimitiveExpression(0);
cboe.Operator = CodeBinaryOperatorType.ValueEquality;
*/
cboe = new CodeBinaryOperatorExpression();
- cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tsParam),"Length");
+ cboe.Left = new CodePropertyReferenceExpression(new CodeVariableReferenceExpression(tsParam), "Length");
cboe.Right = new CodePrimitiveExpression(DMTF_DATETIME_STR_LENGTH);
cboe.Operator = CodeBinaryOperatorType.IdentityInequality;
*/
CodeMethodInvokeExpression cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(tsParam),"Substring");
+ cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(tsParam), "Substring");
cmie.Parameters.Add(new CodePrimitiveExpression(21));
cmie.Parameters.Add(new CodePrimitiveExpression(4));
*/
string strTemp = "tempString";
- tryblock.TryStatements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"),strTemp,
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.String"),"Empty")));
+ tryblock.TryStatements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.String"), strTemp,
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.String"), "Empty")));
/*
tempString = dmtfTimespan.Substring(0, 8);
days = System.Int32.Parse(tempString);
seconds = System.Int32.Parse(tempString);
*/
- ToTimeSpanHelper(0,8,days,tryblock.TryStatements);
- ToTimeSpanHelper(8,2,hours,tryblock.TryStatements);
- ToTimeSpanHelper(10,2,minutes,tryblock.TryStatements);
- ToTimeSpanHelper(12,2,seconds,tryblock.TryStatements);
+ ToTimeSpanHelper(0, 8, days, tryblock.TryStatements);
+ ToTimeSpanHelper(8, 2, hours, tryblock.TryStatements);
+ ToTimeSpanHelper(10, 2, minutes, tryblock.TryStatements);
+ ToTimeSpanHelper(12, 2, seconds, tryblock.TryStatements);
/*
tempString = dmtfTimespan.Substring(15, 6);
*/
cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(tsParam),"Substring");
+ cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(tsParam), "Substring");
cmie.Parameters.Add(new CodePrimitiveExpression(15));
cmie.Parameters.Add(new CodePrimitiveExpression(6));
- tryblock.TryStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strTemp),cmie));
+ tryblock.TryStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strTemp), cmie));
cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.Int64"),"Parse");
+ cmie.Method = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.Int64"), "Parse");
cmie.Parameters.Add(new CodeVariableReferenceExpression(strTemp));
/*
coce.Parameters.Add(new CodeVariableReferenceExpression(seconds));
coce.Parameters.Add(new CodePrimitiveExpression(0));
- cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.TimeSpan"),timespan,coce));
+ cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.TimeSpan"), timespan, coce));
/*
TimeSpan tsTemp = System.TimeSpan.FromTicks(ticks);
*/
string tsTemp = "tsTemp";
cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"),"FromTicks");
+ cmie.Method = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.TimeSpan"), "FromTicks");
cmie.Parameters.Add(new CodeVariableReferenceExpression(ticks));
- cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.TimeSpan"),tsTemp,cmie));
+ cmmts.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference("System.TimeSpan"), tsTemp, cmie));
cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(timespan),"Add");
+ cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(timespan), "Add");
cmie.Parameters.Add(new CodeVariableReferenceExpression(tsTemp));
- cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(timespan),cmie));
+ cmmts.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(timespan), cmie));
/*
}
// Exclusive helper function to be used from AddToTimeSpanFunction
- private static void ToTimeSpanHelper(int start,int numOfCharacters,string strVarToAssign,CodeStatementCollection statCol)
+ private static void ToTimeSpanHelper(int start, int numOfCharacters, string strVarToAssign, CodeStatementCollection statCol)
{
string strTemp = "tempString";
string tsParam = "dmtfTimespan";
CodeMethodInvokeExpression cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(tsParam),"Substring");
+ cmie.Method = new CodeMethodReferenceExpression(new CodeVariableReferenceExpression(tsParam), "Substring");
cmie.Parameters.Add(new CodePrimitiveExpression(start));
cmie.Parameters.Add(new CodePrimitiveExpression(numOfCharacters));
- statCol.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strTemp),cmie));
+ statCol.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strTemp), cmie));
cmie = new CodeMethodInvokeExpression();
- cmie.Method = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.Int32"),"Parse");
+ cmie.Method = new CodeMethodReferenceExpression(new CodeTypeReferenceExpression("System.Int32"), "Parse");
cmie.Parameters.Add(new CodeVariableReferenceExpression(strTemp));
- statCol.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strVarToAssign),cmie));
+ statCol.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(strVarToAssign), cmie));
}
private void InitPrivateMemberVariables(CodeMemberMethod cmMethod)
//
- private static CodeMethodInvokeExpression GenerateConcatStrings(CodeExpression ce1,CodeExpression ce2)
+ private static CodeMethodInvokeExpression GenerateConcatStrings(CodeExpression ce1, CodeExpression ce2)
{
- CodeExpression []cmieParams = {ce1,ce2 };
+ CodeExpression []cmieParams = {ce1, ce2 };
CodeMethodInvokeExpression cmie = new CodeMethodInvokeExpression(new CodeTypeReferenceExpression("System.String"),
"Concat",
void SetStatus(
int lFlags,
int hResult,
- [MarshalAs(UnmanagedType.BStr)] string strParam ,
+ [MarshalAs(UnmanagedType.BStr)] string strParam,
IntPtr pObjParam
);
}
#region Fields
- private static readonly KeyValuePair<string,CURLAUTH>[] s_orderedAuthTypes = new KeyValuePair<string, CURLAUTH>[] {
- new KeyValuePair<string,CURLAUTH>("Negotiate", CURLAUTH.Negotiate),
- new KeyValuePair<string,CURLAUTH>("NTLM", CURLAUTH.NTLM),
- new KeyValuePair<string,CURLAUTH>("Digest", CURLAUTH.Digest),
- new KeyValuePair<string,CURLAUTH>("Basic", CURLAUTH.Basic),
+ private static readonly KeyValuePair<string, CURLAUTH>[] s_orderedAuthTypes = new KeyValuePair<string, CURLAUTH>[] {
+ new KeyValuePair<string, CURLAUTH>("Negotiate", CURLAUTH.Negotiate),
+ new KeyValuePair<string, CURLAUTH>("NTLM", CURLAUTH.NTLM),
+ new KeyValuePair<string, CURLAUTH>("Digest", CURLAUTH.Digest),
+ new KeyValuePair<string, CURLAUTH>("Basic", CURLAUTH.Basic),
};
private static readonly bool s_supportsAutomaticDecompression;
}
else
{
- response.Version = new Version(0,0);
+ response.Version = new Version(0, 0);
}
bool success;
{
internal sealed class Base64Stream : DelegatedStream, IEncodableStream
{
- private static readonly byte[] s_base64DecodeMap = new byte[] {
- //0 1 2 3 4 5 6 7 8 9 A B C D E F
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 0
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 1
- 255,255,255,255,255,255,255,255,255,255,255, 62,255,255,255, 63, // 2
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,255,255,255,255,255,255, // 3
- 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, // 4
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,255,255,255,255,255, // 5
- 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, // 6
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,255,255,255,255,255, // 7
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 8
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 9
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // A
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // B
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // C
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // D
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // E
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // F
+ private static readonly byte[] s_base64DecodeMap = new byte[]
+ {
+ //0 1 2 3 4 5 6 7 8 9 A B C D E F
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 0
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 1
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, // 2
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 255, 255, 255, // 3
+ 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, // 4
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, // 5
+ 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, // 6
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 255, 255, 255, 255, 255, // 7
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 8
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 9
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // A
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // B
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // C
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // D
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // E
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // F
};
- private static readonly byte[] s_base64EncodeMap = new byte[] {
- 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
- 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99,100,101,102,
- 103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,
- 119,120,121,122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47,
+ private static readonly byte[] s_base64EncodeMap = new byte[]
+ {
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47,
61
};
private static readonly byte[] s_hexDecodeMap = new byte[]
{
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 0
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 1
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 2
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,255,255,255,255,255,255, // 3
- 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255, // 4
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 5
- 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255, // 6
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 7
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 8
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 9
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // A
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // B
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // C
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // D
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // E
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // F
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 0
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 1
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 2
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 255, 255, 255, 255, 255, // 3
+ 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 4
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 5
+ 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 6
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 7
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 8
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 9
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // A
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // B
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // C
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // D
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // E
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // F
};
//bytes that correspond to the hex char representations in ASCII (0-9, A-F)
private static readonly byte[] s_hexDecodeMap = new byte[]
{
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 0
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 1
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 2
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,255,255,255,255,255,255, // 3
- 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255, // 4
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 5
- 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255, // 6
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 7
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 8
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 9
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // A
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // B
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // C
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // D
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // E
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // F
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 0
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 1
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 2
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 255, 255, 255, 255, 255, // 3
+ 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 4
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 5
+ 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 6
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 7
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 8
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // 9
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // A
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // B
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // C
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // D
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // E
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, // F
};
private static readonly byte[] s_hexEncodeMap = new byte[] { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70 };
else
{
// If not, fall-back to old IPv4.
- listener = new TcpListener(IPAddress.Any , port);
+ listener = new TcpListener(IPAddress.Any, port);
}
if (NetEventSource.IsEnabled) NetEventSource.Exit(null, port);
{
if (value != null && value.Length > ushort.MaxValue)
{
- throw new ArgumentOutOfRangeException(nameof(value), value, SR.Format(CultureInfo.InvariantCulture,SR.net_headers_toolong, ushort.MaxValue));
+ throw new ArgumentOutOfRangeException(nameof(value), value, SR.Format(CultureInfo.InvariantCulture, SR.net_headers_toolong, ushort.MaxValue));
}
}
InvalidateCachedArrays();
{
if (value != null && value.Length > ushort.MaxValue)
{
- throw new ArgumentOutOfRangeException(nameof(value), value,SR.Format(CultureInfo.InvariantCulture, SR.net_headers_toolong, ushort.MaxValue));
+ throw new ArgumentOutOfRangeException(nameof(value), value, SR.Format(CultureInfo.InvariantCulture, SR.net_headers_toolong, ushort.MaxValue));
}
}
InvalidateCachedArrays();
y = (min.Y > y) ? min.Y : y; // max(y, miny)
y = (max.Y < y) ? max.Y : y; // min(y, maxy)
- return new Vector2(x,y);
+ return new Vector2(x, y);
}
/// <summary>
{ "System.Collections.Generic.Queue`1", new[] { "_syncRoot" } },
{ "System.Collections.Generic.Stack`1", new[] {"_syncRoot" } },
{ "System.Collections.ObjectModel.ReadOnlyCollection`1", new[] {"_syncRoot" } },
- { "System.Collections.ObjectModel.ReadOnlyDictionary`2", new[] {"_syncRoot", "_keys","_values" } },
+ { "System.Collections.ObjectModel.ReadOnlyDictionary`2", new[] {"_syncRoot", "_keys", "_values" } },
{ "System.Tuple`1", Array.Empty<string>() },
{ "System.Tuple`2", Array.Empty<string>() },
{ "System.Tuple`3", Array.Empty<string>() },
private static readonly byte[] s_val2byte = new byte[]
{
- (byte)'A',(byte)'B',(byte)'C',(byte)'D',(byte)'E',(byte)'F',(byte)'G',(byte)'H',(byte)'I',(byte)'J',(byte)'K',(byte)'L',(byte)'M',(byte)'N',(byte)'O',(byte)'P',
- (byte)'Q',(byte)'R',(byte)'S',(byte)'T',(byte)'U',(byte)'V',(byte)'W',(byte)'X',(byte)'Y',(byte)'Z',(byte)'a',(byte)'b',(byte)'c',(byte)'d',(byte)'e',(byte)'f',
- (byte)'g',(byte)'h',(byte)'i',(byte)'j',(byte)'k',(byte)'l',(byte)'m',(byte)'n',(byte)'o',(byte)'p',(byte)'q',(byte)'r',(byte)'s',(byte)'t',(byte)'u',(byte)'v',
- (byte)'w',(byte)'x',(byte)'y',(byte)'z',(byte)'0',(byte)'1',(byte)'2',(byte)'3',(byte)'4',(byte)'5',(byte)'6',(byte)'7',(byte)'8',(byte)'9',(byte)'+',(byte)'/'
+ (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G', (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N', (byte)'O', (byte)'P',
+ (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U', (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z', (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f',
+ (byte)'g', (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n', (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u', (byte)'v',
+ (byte)'w', (byte)'x', (byte)'y', (byte)'z', (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5', (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'+', (byte)'/'
};
public override int GetMaxByteCount(int charCount)
{
byte[] xmlBuffer =
{
- (byte)'x',(byte)'m',(byte)'l',
- (byte)'h',(byte)'t',(byte)'t',(byte)'p',(byte)':',(byte)'/',(byte)'/',(byte)'w',
- (byte)'w',(byte)'w',(byte)'.',(byte)'w',(byte)'3',(byte)'.',(byte)'o',(byte)'r',
- (byte)'g',(byte)'/',(byte)'X',(byte)'M',(byte)'L',(byte)'/',(byte)'1',(byte)'9',
- (byte)'9',(byte)'8',(byte)'/',(byte)'n',(byte)'a',(byte)'m',(byte)'e',(byte)'s',
- (byte)'p',(byte)'a',(byte)'c',(byte)'e'
+ (byte)'x', (byte)'m', (byte)'l',
+ (byte)'h', (byte)'t', (byte)'t', (byte)'p', (byte)':', (byte)'/', (byte)'/', (byte)'w',
+ (byte)'w', (byte)'w', (byte)'.', (byte)'w', (byte)'3', (byte)'.', (byte)'o', (byte)'r',
+ (byte)'g', (byte)'/', (byte)'X', (byte)'M', (byte)'L', (byte)'/', (byte)'1', (byte)'9',
+ (byte)'9', (byte)'8', (byte)'/', (byte)'n', (byte)'a', (byte)'m', (byte)'e', (byte)'s',
+ (byte)'p', (byte)'a', (byte)'c', (byte)'e'
};
Namespace nameSpace = new Namespace(new XmlBufferReader(xmlBuffer));
nameSpace.Prefix.SetValue(0, 3);
}
// Cut trailing spaces
- private void GetLengthWithoutTrailingSpaces(string str, ref ushort length ,int idx)
+ private void GetLengthWithoutTrailingSpaces(string str, ref ushort length, int idx)
{
// to avoid dereferencing ref length parameter for every update
ushort local = length;
internal abstract class HtmlTernaryTree
{
internal static byte[] htmlElements = {
- 73,4,147,0, 77,140,162,0, 71,0,0,0, 0,0,0,11, 68,4,85,0, 73,71,92,0, 86,81,0,0,
- 0,0,0,64, 66,3,45,0, 82,21,55,0, 0,0,0,8, 65,0,0,0, 82,4,0,0, 69,0,0,0,
- 65,0,0,0, 0,0,0,75, 68,7,8,0, 68,0,0,0, 82,0,0,0, 69,0,0,0, 83,0,0,0,
- 83,0,0,0, 0,0,0,64, 0,0,0,1, 80,0,0,0, 80,0,0,0, 76,0,0,0, 69,0,0,0,
- 84,0,0,0, 0,0,0,64, 65,0,9,0, 83,0,0,0, 69,0,0,0, 70,5,0,0, 79,0,0,0,
- 78,0,0,0, 84,0,0,0, 0,0,0,72, 0,0,0,73, 76,0,10,0, 79,0,0,0, 67,0,0,0,
- 75,0,0,0, 81,0,0,0, 85,0,0,0, 79,0,0,0, 84,0,0,0, 69,0,0,0, 0,0,0,65,
- 79,0,0,0, 68,0,0,0, 89,0,0,0, 0,0,0,64, 67,0,0,0, 79,3,0,0, 76,0,0,0,
- 0,0,22,72, 65,0,13,0, 80,0,0,0, 84,0,0,0, 73,0,0,0, 79,0,0,0, 78,0,0,0,
- 0,0,0,64, 85,0,0,0, 84,0,0,0, 84,0,0,0, 79,0,0,0, 78,0,0,0, 0,0,0,2,
- 69,0,0,0, 78,0,0,0, 84,0,0,0, 69,0,0,0, 82,0,0,0, 0,0,0,64, 68,0,8,0,
- 0,0,0,64, 71,0,0,0, 82,0,0,0, 79,0,0,0, 85,0,0,0, 80,0,0,0, 0,0,0,64,
- 69,0,0,0, 76,0,0,0, 0,0,0,65, 82,0,0,0, 0,0,0,66, 72,3,0,0, 50,31,33,0,
- 0,0,0,64, 70,0,0,0, 79,8,16,0, 78,0,20,0, 84,0,0,0, 0,0,0,64, 84,2,0,0,
- 0,0,0,64, 76,0,0,0, 0,0,0,66, 73,0,0,0, 69,0,0,0, 76,0,0,0, 68,0,0,0,
- 83,0,0,0, 69,0,0,0, 84,0,0,0, 0,0,0,64, 82,0,0,0, 65,0,0,0, 77,0,0,0,
- 69,0,0,0, 0,0,4,74, 82,0,0,0, 77,0,0,0, 0,0,0,65, 83,0,0,0, 69,0,0,0,
- 84,0,0,0, 0,0,0,64, 49,0,0,0, 0,0,0,64, 54,2,8,0, 0,0,0,64, 52,2,4,0,
- 0,0,0,64, 51,0,0,0, 0,0,0,64, 53,0,0,0, 0,0,0,64, 82,2,6,0, 0,0,0,74,
- 69,0,0,0, 65,0,0,0, 68,0,0,0, 0,0,0,97, 84,0,0,0, 77,0,0,0, 76,0,0,0,
- 0,0,0,64, 70,0,0,0, 82,0,0,0, 65,0,0,0, 77,0,0,0, 69,0,0,0, 0,0,0,64,
- 80,4,84,0, 82,77,0,0, 69,0,0,0, 0,0,0,64, 77,5,37,0, 69,30,0,0, 84,32,0,0,
- 65,0,0,0, 0,0,0,72, 76,0,0,0, 69,0,20,0, 71,0,0,0, 69,0,0,0, 78,0,0,0,
- 68,0,0,0, 0,0,0,64, 78,0,7,0, 83,2,0,0, 0,0,0,65, 80,0,0,0, 85,0,0,0,
- 84,0,0,0, 0,0,0,11, 83,0,0,0, 73,0,0,0, 78,0,0,0, 68,0,0,0, 69,0,0,0,
- 88,0,0,0, 0,0,0,72, 73,0,0,0, 78,3,0,0, 75,0,0,0, 0,0,0,73, 0,0,0,64,
- 65,0,0,0, 80,0,0,0, 0,0,0,64, 78,0,0,0, 85,0,0,0, 0,0,0,66, 79,3,0,0,
- 76,18,24,0, 0,0,0,66, 78,0,0,0, 79,0,0,0, 83,7,0,0, 67,0,0,0, 82,0,0,0,
- 73,0,0,0, 80,0,0,0, 84,0,0,0, 0,0,0,64, 70,0,0,0, 82,0,0,0, 65,0,0,0,
- 77,0,0,0, 69,0,0,0, 83,0,0,0, 0,0,0,64, 66,0,0,0, 74,0,0,0, 69,0,0,0,
- 67,0,0,0, 84,0,0,0, 0,0,0,3, 80,0,0,0, 84,0,0,0, 73,4,0,0, 79,0,0,0,
- 78,0,0,0, 0,0,0,66, 71,0,0,0, 82,0,0,0, 79,0,0,0, 85,0,0,0, 80,0,0,0,
- 0,0,0,66, 0,0,1,64, 65,0,0,0, 82,0,0,0, 65,0,0,0, 77,0,0,0, 0,0,0,72,
- 84,3,65,0, 68,28,38,0, 0,0,0,66, 83,8,0,0, 69,6,15,0, 76,0,0,0, 69,0,0,0,
- 67,0,0,0, 84,0,0,0, 0,0,0,2, 0,0,3,64, 81,0,0,0, 0,0,0,1, 67,0,0,0,
- 82,0,0,0, 73,0,0,0, 80,0,0,0, 84,0,0,0, 0,0,0,19, 84,0,0,0, 89,4,0,0,
- 76,0,0,0, 69,0,0,0, 0,0,0,80, 82,0,0,0, 73,0,0,0, 75,0,0,0, 69,0,0,0,
- 0,0,0,64, 65,0,5,0, 66,0,0,0, 76,0,0,0, 69,0,0,0, 0,0,0,65, 66,0,0,0,
- 79,0,0,0, 68,0,0,0, 89,0,0,0, 0,0,0,64, 72,5,19,0, 69,17,0,0, 65,0,0,0,
- 68,0,0,0, 0,0,0,64, 70,5,0,0, 79,0,0,0, 79,0,0,0, 84,0,0,0, 0,0,0,64,
- 69,0,0,0, 88,0,0,0, 84,0,0,0, 65,0,0,0, 82,0,0,0, 69,0,0,0, 65,0,0,0,
- 0,0,0,2, 0,0,0,66, 82,2,0,0, 0,0,0,64, 73,0,0,0, 84,0,0,0, 76,0,0,0,
- 69,0,0,0, 0,0,0,64, 85,0,3,0, 76,0,0,0, 0,0,0,66, 88,0,0,0, 77,0,0,0,
- 80,0,0,0, 0,0,0,64,
+ 73, 4, 147, 0, 77, 140, 162, 0, 71, 0, 0, 0, 0, 0, 0, 11, 68, 4, 85, 0, 73, 71, 92, 0, 86, 81, 0, 0,
+ 0, 0, 0, 64, 66, 3, 45, 0, 82, 21, 55, 0, 0, 0, 0, 8, 65, 0, 0, 0, 82, 4, 0, 0, 69, 0, 0, 0,
+ 65, 0, 0, 0, 0, 0, 0, 75, 68, 7, 8, 0, 68, 0, 0, 0, 82, 0, 0, 0, 69, 0, 0, 0, 83, 0, 0, 0,
+ 83, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 1, 80, 0, 0, 0, 80, 0, 0, 0, 76, 0, 0, 0, 69, 0, 0, 0,
+ 84, 0, 0, 0, 0, 0, 0, 64, 65, 0, 9, 0, 83, 0, 0, 0, 69, 0, 0, 0, 70, 5, 0, 0, 79, 0, 0, 0,
+ 78, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 73, 76, 0, 10, 0, 79, 0, 0, 0, 67, 0, 0, 0,
+ 75, 0, 0, 0, 81, 0, 0, 0, 85, 0, 0, 0, 79, 0, 0, 0, 84, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 65,
+ 79, 0, 0, 0, 68, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 64, 67, 0, 0, 0, 79, 3, 0, 0, 76, 0, 0, 0,
+ 0, 0, 22, 72, 65, 0, 13, 0, 80, 0, 0, 0, 84, 0, 0, 0, 73, 0, 0, 0, 79, 0, 0, 0, 78, 0, 0, 0,
+ 0, 0, 0, 64, 85, 0, 0, 0, 84, 0, 0, 0, 84, 0, 0, 0, 79, 0, 0, 0, 78, 0, 0, 0, 0, 0, 0, 2,
+ 69, 0, 0, 0, 78, 0, 0, 0, 84, 0, 0, 0, 69, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 64, 68, 0, 8, 0,
+ 0, 0, 0, 64, 71, 0, 0, 0, 82, 0, 0, 0, 79, 0, 0, 0, 85, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 64,
+ 69, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 65, 82, 0, 0, 0, 0, 0, 0, 66, 72, 3, 0, 0, 50, 31, 33, 0,
+ 0, 0, 0, 64, 70, 0, 0, 0, 79, 8, 16, 0, 78, 0, 20, 0, 84, 0, 0, 0, 0, 0, 0, 64, 84, 2, 0, 0,
+ 0, 0, 0, 64, 76, 0, 0, 0, 0, 0, 0, 66, 73, 0, 0, 0, 69, 0, 0, 0, 76, 0, 0, 0, 68, 0, 0, 0,
+ 83, 0, 0, 0, 69, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 64, 82, 0, 0, 0, 65, 0, 0, 0, 77, 0, 0, 0,
+ 69, 0, 0, 0, 0, 0, 4, 74, 82, 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, 65, 83, 0, 0, 0, 69, 0, 0, 0,
+ 84, 0, 0, 0, 0, 0, 0, 64, 49, 0, 0, 0, 0, 0, 0, 64, 54, 2, 8, 0, 0, 0, 0, 64, 52, 2, 4, 0,
+ 0, 0, 0, 64, 51, 0, 0, 0, 0, 0, 0, 64, 53, 0, 0, 0, 0, 0, 0, 64, 82, 2, 6, 0, 0, 0, 0, 74,
+ 69, 0, 0, 0, 65, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 97, 84, 0, 0, 0, 77, 0, 0, 0, 76, 0, 0, 0,
+ 0, 0, 0, 64, 70, 0, 0, 0, 82, 0, 0, 0, 65, 0, 0, 0, 77, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 64,
+ 80, 4, 84, 0, 82, 77, 0, 0, 69, 0, 0, 0, 0, 0, 0, 64, 77, 5, 37, 0, 69, 30, 0, 0, 84, 32, 0, 0,
+ 65, 0, 0, 0, 0, 0, 0, 72, 76, 0, 0, 0, 69, 0, 20, 0, 71, 0, 0, 0, 69, 0, 0, 0, 78, 0, 0, 0,
+ 68, 0, 0, 0, 0, 0, 0, 64, 78, 0, 7, 0, 83, 2, 0, 0, 0, 0, 0, 65, 80, 0, 0, 0, 85, 0, 0, 0,
+ 84, 0, 0, 0, 0, 0, 0, 11, 83, 0, 0, 0, 73, 0, 0, 0, 78, 0, 0, 0, 68, 0, 0, 0, 69, 0, 0, 0,
+ 88, 0, 0, 0, 0, 0, 0, 72, 73, 0, 0, 0, 78, 3, 0, 0, 75, 0, 0, 0, 0, 0, 0, 73, 0, 0, 0, 64,
+ 65, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 64, 78, 0, 0, 0, 85, 0, 0, 0, 0, 0, 0, 66, 79, 3, 0, 0,
+ 76, 18, 24, 0, 0, 0, 0, 66, 78, 0, 0, 0, 79, 0, 0, 0, 83, 7, 0, 0, 67, 0, 0, 0, 82, 0, 0, 0,
+ 73, 0, 0, 0, 80, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 64, 70, 0, 0, 0, 82, 0, 0, 0, 65, 0, 0, 0,
+ 77, 0, 0, 0, 69, 0, 0, 0, 83, 0, 0, 0, 0, 0, 0, 64, 66, 0, 0, 0, 74, 0, 0, 0, 69, 0, 0, 0,
+ 67, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 3, 80, 0, 0, 0, 84, 0, 0, 0, 73, 4, 0, 0, 79, 0, 0, 0,
+ 78, 0, 0, 0, 0, 0, 0, 66, 71, 0, 0, 0, 82, 0, 0, 0, 79, 0, 0, 0, 85, 0, 0, 0, 80, 0, 0, 0,
+ 0, 0, 0, 66, 0, 0, 1, 64, 65, 0, 0, 0, 82, 0, 0, 0, 65, 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, 72,
+ 84, 3, 65, 0, 68, 28, 38, 0, 0, 0, 0, 66, 83, 8, 0, 0, 69, 6, 15, 0, 76, 0, 0, 0, 69, 0, 0, 0,
+ 67, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 64, 81, 0, 0, 0, 0, 0, 0, 1, 67, 0, 0, 0,
+ 82, 0, 0, 0, 73, 0, 0, 0, 80, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 19, 84, 0, 0, 0, 89, 4, 0, 0,
+ 76, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 80, 82, 0, 0, 0, 73, 0, 0, 0, 75, 0, 0, 0, 69, 0, 0, 0,
+ 0, 0, 0, 64, 65, 0, 5, 0, 66, 0, 0, 0, 76, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 65, 66, 0, 0, 0,
+ 79, 0, 0, 0, 68, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 64, 72, 5, 19, 0, 69, 17, 0, 0, 65, 0, 0, 0,
+ 68, 0, 0, 0, 0, 0, 0, 64, 70, 5, 0, 0, 79, 0, 0, 0, 79, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 64,
+ 69, 0, 0, 0, 88, 0, 0, 0, 84, 0, 0, 0, 65, 0, 0, 0, 82, 0, 0, 0, 69, 0, 0, 0, 65, 0, 0, 0,
+ 0, 0, 0, 2, 0, 0, 0, 66, 82, 2, 0, 0, 0, 0, 0, 64, 73, 0, 0, 0, 84, 0, 0, 0, 76, 0, 0, 0,
+ 69, 0, 0, 0, 0, 0, 0, 64, 85, 0, 3, 0, 76, 0, 0, 0, 0, 0, 0, 66, 88, 0, 0, 0, 77, 0, 0, 0,
+ 80, 0, 0, 0, 0, 0, 0, 64,
};
internal static byte[] htmlAttributes = {
- 72,5,77,0, 82,0,0,0, 69,0,0,0, 70,0,0,0, 0,0,0,1, 67,12,40,0, 79,7,0,0,
- 77,31,0,0, 80,0,0,0, 65,0,0,0, 67,0,0,0, 84,0,0,0, 0,0,0,2, 73,11,18,0,
- 84,0,0,0, 69,0,0,0, 0,0,0,1, 65,0,0,0, 67,0,0,0, 84,0,0,0, 73,0,0,0,
- 79,0,0,0, 78,0,0,0, 0,0,0,1, 72,0,0,0, 69,0,0,0, 67,0,0,0, 75,0,0,0,
- 69,0,0,0, 68,0,0,0, 0,0,0,2, 76,0,0,0, 65,0,0,0, 83,0,0,0, 83,0,0,0,
- 73,0,0,0, 68,0,0,0, 0,0,0,1, 68,0,0,0, 69,0,0,0, 66,0,0,0, 65,0,0,0,
- 83,0,0,0, 69,0,0,0, 0,0,0,1, 68,0,28,0, 69,7,15,0, 67,0,22,0, 76,0,0,0,
- 65,0,0,0, 82,0,0,0, 69,0,0,0, 0,0,0,2, 65,0,0,0, 84,0,0,0, 65,0,0,0,
- 0,0,1,1, 83,0,0,0, 82,0,0,0, 67,0,0,0, 0,0,0,1, 73,0,0,0, 83,0,0,0,
- 65,0,0,0, 66,0,0,0, 76,0,0,0, 69,0,0,0, 68,0,0,0, 0,0,0,2, 70,0,0,0,
- 69,0,0,0, 82,0,0,0, 0,0,0,2, 70,0,0,0, 79,0,0,0, 82,0,0,0, 0,0,0,1,
- 78,8,48,0, 79,36,0,0, 83,30,55,0, 72,0,0,0, 65,0,0,0, 68,0,0,0, 69,0,0,0,
- 0,0,0,2, 77,9,0,0, 85,0,0,0, 76,0,0,0, 84,0,0,0, 73,0,0,0, 80,0,0,0,
- 76,0,0,0, 69,0,0,0, 0,0,0,2, 73,0,6,0, 83,0,0,0, 77,0,0,0, 65,0,0,0,
- 80,0,0,0, 0,0,0,2, 76,0,0,0, 79,0,0,0, 78,0,0,0, 71,0,0,0, 68,0,0,0,
- 69,0,0,0, 83,0,0,0, 67,0,0,0, 0,0,0,1, 72,0,9,0, 82,0,0,0, 69,0,0,0,
- 70,0,0,0, 0,0,0,2, 65,0,0,0, 77,0,0,0, 69,0,0,0, 0,0,0,1, 82,0,0,0,
- 69,0,0,0, 83,0,0,0, 73,0,0,0, 90,0,0,0, 69,0,0,0, 0,0,0,2, 82,14,22,0,
- 69,0,0,0, 65,0,0,0, 68,0,0,0, 79,0,0,0, 78,0,0,0, 76,0,0,0, 89,0,0,0,
- 0,0,0,2, 87,0,0,0, 82,0,0,0, 65,0,0,0, 80,0,0,0, 0,0,0,2, 80,0,0,0,
- 82,0,0,0, 79,0,0,0, 70,0,0,0, 73,0,0,0, 76,0,0,0, 69,0,0,0, 0,0,0,1,
- 83,0,12,0, 82,3,0,0, 67,0,0,0, 0,0,0,1, 69,0,0,0, 76,0,0,0, 69,0,0,0,
- 67,0,0,0, 84,0,0,0, 69,0,0,0, 68,0,0,0, 0,0,0,2, 85,0,0,0, 83,0,0,0,
- 69,0,0,0, 77,0,0,0, 65,0,0,0, 80,0,0,0, 0,0,0,1,
+ 72, 5, 77, 0, 82, 0, 0, 0, 69, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 1, 67, 12, 40, 0, 79, 7, 0, 0,
+ 77, 31, 0, 0, 80, 0, 0, 0, 65, 0, 0, 0, 67, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 2, 73, 11, 18, 0,
+ 84, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 1, 65, 0, 0, 0, 67, 0, 0, 0, 84, 0, 0, 0, 73, 0, 0, 0,
+ 79, 0, 0, 0, 78, 0, 0, 0, 0, 0, 0, 1, 72, 0, 0, 0, 69, 0, 0, 0, 67, 0, 0, 0, 75, 0, 0, 0,
+ 69, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 2, 76, 0, 0, 0, 65, 0, 0, 0, 83, 0, 0, 0, 83, 0, 0, 0,
+ 73, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 1, 68, 0, 0, 0, 69, 0, 0, 0, 66, 0, 0, 0, 65, 0, 0, 0,
+ 83, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 1, 68, 0, 28, 0, 69, 7, 15, 0, 67, 0, 22, 0, 76, 0, 0, 0,
+ 65, 0, 0, 0, 82, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 2, 65, 0, 0, 0, 84, 0, 0, 0, 65, 0, 0, 0,
+ 0, 0, 1, 1, 83, 0, 0, 0, 82, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 1, 73, 0, 0, 0, 83, 0, 0, 0,
+ 65, 0, 0, 0, 66, 0, 0, 0, 76, 0, 0, 0, 69, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 2, 70, 0, 0, 0,
+ 69, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 2, 70, 0, 0, 0, 79, 0, 0, 0, 82, 0, 0, 0, 0, 0, 0, 1,
+ 78, 8, 48, 0, 79, 36, 0, 0, 83, 30, 55, 0, 72, 0, 0, 0, 65, 0, 0, 0, 68, 0, 0, 0, 69, 0, 0, 0,
+ 0, 0, 0, 2, 77, 9, 0, 0, 85, 0, 0, 0, 76, 0, 0, 0, 84, 0, 0, 0, 73, 0, 0, 0, 80, 0, 0, 0,
+ 76, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 2, 73, 0, 6, 0, 83, 0, 0, 0, 77, 0, 0, 0, 65, 0, 0, 0,
+ 80, 0, 0, 0, 0, 0, 0, 2, 76, 0, 0, 0, 79, 0, 0, 0, 78, 0, 0, 0, 71, 0, 0, 0, 68, 0, 0, 0,
+ 69, 0, 0, 0, 83, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 1, 72, 0, 9, 0, 82, 0, 0, 0, 69, 0, 0, 0,
+ 70, 0, 0, 0, 0, 0, 0, 2, 65, 0, 0, 0, 77, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 1, 82, 0, 0, 0,
+ 69, 0, 0, 0, 83, 0, 0, 0, 73, 0, 0, 0, 90, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 2, 82, 14, 22, 0,
+ 69, 0, 0, 0, 65, 0, 0, 0, 68, 0, 0, 0, 79, 0, 0, 0, 78, 0, 0, 0, 76, 0, 0, 0, 89, 0, 0, 0,
+ 0, 0, 0, 2, 87, 0, 0, 0, 82, 0, 0, 0, 65, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 2, 80, 0, 0, 0,
+ 82, 0, 0, 0, 79, 0, 0, 0, 70, 0, 0, 0, 73, 0, 0, 0, 76, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 1,
+ 83, 0, 12, 0, 82, 3, 0, 0, 67, 0, 0, 0, 0, 0, 0, 1, 69, 0, 0, 0, 76, 0, 0, 0, 69, 0, 0, 0,
+ 67, 0, 0, 0, 84, 0, 0, 0, 69, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 2, 85, 0, 0, 0, 83, 0, 0, 0,
+ 69, 0, 0, 0, 77, 0, 0, 0, 65, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 1,
};
}
}
}
private static readonly OpCode[] s_ldindOpCodes = new OpCode[] {
- OpCodes.Nop,//Empty = 0,
- OpCodes.Nop,//Object = 1,
- OpCodes.Nop,//DBNull = 2,
- OpCodes.Ldind_I1,//Boolean = 3,
- OpCodes.Ldind_I2,//Char = 4,
- OpCodes.Ldind_I1,//SByte = 5,
- OpCodes.Ldind_U1,//Byte = 6,
- OpCodes.Ldind_I2,//Int16 = 7,
- OpCodes.Ldind_U2,//UInt16 = 8,
- OpCodes.Ldind_I4,//Int32 = 9,
- OpCodes.Ldind_U4,//UInt32 = 10,
- OpCodes.Ldind_I8,//Int64 = 11,
- OpCodes.Ldind_I8,//UInt64 = 12,
- OpCodes.Ldind_R4,//Single = 13,
- OpCodes.Ldind_R8,//Double = 14,
- OpCodes.Nop,//Decimal = 15,
- OpCodes.Nop,//DateTime = 16,
- OpCodes.Nop,//17
- OpCodes.Ldind_Ref,//String = 18,
+ OpCodes.Nop, //Empty = 0,
+ OpCodes.Nop, //Object = 1,
+ OpCodes.Nop, //DBNull = 2,
+ OpCodes.Ldind_I1, //Boolean = 3,
+ OpCodes.Ldind_I2, //Char = 4,
+ OpCodes.Ldind_I1, //SByte = 5,
+ OpCodes.Ldind_U1, //Byte = 6,
+ OpCodes.Ldind_I2, //Int16 = 7,
+ OpCodes.Ldind_U2, //UInt16 = 8,
+ OpCodes.Ldind_I4, //Int32 = 9,
+ OpCodes.Ldind_U4, //UInt32 = 10,
+ OpCodes.Ldind_I8, //Int64 = 11,
+ OpCodes.Ldind_I8, //UInt64 = 12,
+ OpCodes.Ldind_R4, //Single = 13,
+ OpCodes.Ldind_R8, //Double = 14,
+ OpCodes.Nop, //Decimal = 15,
+ OpCodes.Nop, //DateTime = 16,
+ OpCodes.Nop, //17
+ OpCodes.Ldind_Ref, //String = 18,
};
}
private static readonly OpCode[] s_ldelemOpCodes = new OpCode[] {
- OpCodes.Nop,//Empty = 0,
- OpCodes.Ldelem_Ref,//Object = 1,
- OpCodes.Ldelem_Ref,//DBNull = 2,
- OpCodes.Ldelem_I1,//Boolean = 3,
- OpCodes.Ldelem_I2,//Char = 4,
- OpCodes.Ldelem_I1,//SByte = 5,
- OpCodes.Ldelem_U1,//Byte = 6,
- OpCodes.Ldelem_I2,//Int16 = 7,
- OpCodes.Ldelem_U2,//UInt16 = 8,
- OpCodes.Ldelem_I4,//Int32 = 9,
- OpCodes.Ldelem_U4,//UInt32 = 10,
- OpCodes.Ldelem_I8,//Int64 = 11,
- OpCodes.Ldelem_I8,//UInt64 = 12,
- OpCodes.Ldelem_R4,//Single = 13,
- OpCodes.Ldelem_R8,//Double = 14,
- OpCodes.Nop,//Decimal = 15,
- OpCodes.Nop,//DateTime = 16,
- OpCodes.Nop,//17
- OpCodes.Ldelem_Ref,//String = 18,
+ OpCodes.Nop, //Empty = 0,
+ OpCodes.Ldelem_Ref, //Object = 1,
+ OpCodes.Ldelem_Ref, //DBNull = 2,
+ OpCodes.Ldelem_I1, //Boolean = 3,
+ OpCodes.Ldelem_I2, //Char = 4,
+ OpCodes.Ldelem_I1, //SByte = 5,
+ OpCodes.Ldelem_U1, //Byte = 6,
+ OpCodes.Ldelem_I2, //Int16 = 7,
+ OpCodes.Ldelem_U2, //UInt16 = 8,
+ OpCodes.Ldelem_I4, //Int32 = 9,
+ OpCodes.Ldelem_U4, //UInt32 = 10,
+ OpCodes.Ldelem_I8, //Int64 = 11,
+ OpCodes.Ldelem_I8, //UInt64 = 12,
+ OpCodes.Ldelem_R4, //Single = 13,
+ OpCodes.Ldelem_R8, //Double = 14,
+ OpCodes.Nop, //Decimal = 15,
+ OpCodes.Nop, //DateTime = 16,
+ OpCodes.Nop, //17
+ OpCodes.Ldelem_Ref, //String = 18,
};
private OpCode GetLdelemOpCode(TypeCode typeCode)
}
private static readonly OpCode[] s_stelemOpCodes = new OpCode[] {
- OpCodes.Nop,//Empty = 0,
- OpCodes.Stelem_Ref,//Object = 1,
- OpCodes.Stelem_Ref,//DBNull = 2,
- OpCodes.Stelem_I1,//Boolean = 3,
- OpCodes.Stelem_I2,//Char = 4,
- OpCodes.Stelem_I1,//SByte = 5,
- OpCodes.Stelem_I1,//Byte = 6,
- OpCodes.Stelem_I2,//Int16 = 7,
- OpCodes.Stelem_I2,//UInt16 = 8,
- OpCodes.Stelem_I4,//Int32 = 9,
- OpCodes.Stelem_I4,//UInt32 = 10,
- OpCodes.Stelem_I8,//Int64 = 11,
- OpCodes.Stelem_I8,//UInt64 = 12,
- OpCodes.Stelem_R4,//Single = 13,
- OpCodes.Stelem_R8,//Double = 14,
- OpCodes.Nop,//Decimal = 15,
- OpCodes.Nop,//DateTime = 16,
- OpCodes.Nop,//17
- OpCodes.Stelem_Ref,//String = 18,
+ OpCodes.Nop, //Empty = 0,
+ OpCodes.Stelem_Ref, //Object = 1,
+ OpCodes.Stelem_Ref, //DBNull = 2,
+ OpCodes.Stelem_I1, //Boolean = 3,
+ OpCodes.Stelem_I2, //Char = 4,
+ OpCodes.Stelem_I1, //SByte = 5,
+ OpCodes.Stelem_I1, //Byte = 6,
+ OpCodes.Stelem_I2, //Int16 = 7,
+ OpCodes.Stelem_I2, //UInt16 = 8,
+ OpCodes.Stelem_I4, //Int32 = 9,
+ OpCodes.Stelem_I4, //UInt32 = 10,
+ OpCodes.Stelem_I8, //Int64 = 11,
+ OpCodes.Stelem_I8, //UInt64 = 12,
+ OpCodes.Stelem_R4, //Single = 13,
+ OpCodes.Stelem_R8, //Double = 14,
+ OpCodes.Nop, //Decimal = 15,
+ OpCodes.Nop, //DateTime = 16,
+ OpCodes.Nop, //17
+ OpCodes.Stelem_Ref, //String = 18,
};
private OpCode GetStelemOpCode(TypeCode typeCode)
}
private static readonly OpCode[] s_convOpCodes = new OpCode[] {
- OpCodes.Nop,//Empty = 0,
- OpCodes.Nop,//Object = 1,
- OpCodes.Nop,//DBNull = 2,
- OpCodes.Conv_I1,//Boolean = 3,
- OpCodes.Conv_I2,//Char = 4,
- OpCodes.Conv_I1,//SByte = 5,
- OpCodes.Conv_U1,//Byte = 6,
- OpCodes.Conv_I2,//Int16 = 7,
- OpCodes.Conv_U2,//UInt16 = 8,
- OpCodes.Conv_I4,//Int32 = 9,
- OpCodes.Conv_U4,//UInt32 = 10,
- OpCodes.Conv_I8,//Int64 = 11,
- OpCodes.Conv_U8,//UInt64 = 12,
- OpCodes.Conv_R4,//Single = 13,
- OpCodes.Conv_R8,//Double = 14,
- OpCodes.Nop,//Decimal = 15,
- OpCodes.Nop,//DateTime = 16,
- OpCodes.Nop,//17
- OpCodes.Nop,//String = 18,
+ OpCodes.Nop, //Empty = 0,
+ OpCodes.Nop, //Object = 1,
+ OpCodes.Nop, //DBNull = 2,
+ OpCodes.Conv_I1, //Boolean = 3,
+ OpCodes.Conv_I2, //Char = 4,
+ OpCodes.Conv_I1, //SByte = 5,
+ OpCodes.Conv_U1, //Byte = 6,
+ OpCodes.Conv_I2, //Int16 = 7,
+ OpCodes.Conv_U2, //UInt16 = 8,
+ OpCodes.Conv_I4, //Int32 = 9,
+ OpCodes.Conv_U4, //UInt32 = 10,
+ OpCodes.Conv_I8, //Int64 = 11,
+ OpCodes.Conv_U8, //UInt64 = 12,
+ OpCodes.Conv_R4, //Single = 13,
+ OpCodes.Conv_R8, //Double = 14,
+ OpCodes.Nop, //Decimal = 15,
+ OpCodes.Nop, //DateTime = 16,
+ OpCodes.Nop, //17
+ OpCodes.Nop, //String = 18,
};
private OpCode GetConvOpCode(TypeCode typeCode)
public string Name { get { return _name; } }
internal static XPathResultType[] ReturnTypes = {
- /* FunctionType.FuncLast */ XPathResultType.Number ,
- /* FunctionType.FuncPosition */ XPathResultType.Number ,
- /* FunctionType.FuncCount */ XPathResultType.Number ,
+ /* FunctionType.FuncLast */ XPathResultType.Number,
+ /* FunctionType.FuncPosition */ XPathResultType.Number,
+ /* FunctionType.FuncCount */ XPathResultType.Number,
/* FunctionType.FuncID */ XPathResultType.NodeSet,
- /* FunctionType.FuncLocalName */ XPathResultType.String ,
- /* FunctionType.FuncNameSpaceUri */ XPathResultType.String ,
- /* FunctionType.FuncName */ XPathResultType.String ,
- /* FunctionType.FuncString */ XPathResultType.String ,
+ /* FunctionType.FuncLocalName */ XPathResultType.String,
+ /* FunctionType.FuncNameSpaceUri */ XPathResultType.String,
+ /* FunctionType.FuncName */ XPathResultType.String,
+ /* FunctionType.FuncString */ XPathResultType.String,
/* FunctionType.FuncBoolean */ XPathResultType.Boolean,
- /* FunctionType.FuncNumber */ XPathResultType.Number ,
+ /* FunctionType.FuncNumber */ XPathResultType.Number,
/* FunctionType.FuncTrue */ XPathResultType.Boolean,
/* FunctionType.FuncFalse */ XPathResultType.Boolean,
/* FunctionType.FuncNot */ XPathResultType.Boolean,
- /* FunctionType.FuncConcat */ XPathResultType.String ,
+ /* FunctionType.FuncConcat */ XPathResultType.String,
/* FunctionType.FuncStartsWith */ XPathResultType.Boolean,
/* FunctionType.FuncContains */ XPathResultType.Boolean,
- /* FunctionType.FuncSubstringBefore */ XPathResultType.String ,
- /* FunctionType.FuncSubstringAfter */ XPathResultType.String ,
- /* FunctionType.FuncSubstring */ XPathResultType.String ,
- /* FunctionType.FuncStringLength */ XPathResultType.Number ,
- /* FunctionType.FuncNormalize */ XPathResultType.String ,
- /* FunctionType.FuncTranslate */ XPathResultType.String ,
+ /* FunctionType.FuncSubstringBefore */ XPathResultType.String,
+ /* FunctionType.FuncSubstringAfter */ XPathResultType.String,
+ /* FunctionType.FuncSubstring */ XPathResultType.String,
+ /* FunctionType.FuncStringLength */ XPathResultType.Number,
+ /* FunctionType.FuncNormalize */ XPathResultType.String,
+ /* FunctionType.FuncTranslate */ XPathResultType.String,
/* FunctionType.FuncLang */ XPathResultType.Boolean,
- /* FunctionType.FuncSum */ XPathResultType.Number ,
- /* FunctionType.FuncFloor */ XPathResultType.Number ,
- /* FunctionType.FuncCeiling */ XPathResultType.Number ,
- /* FunctionType.FuncRound */ XPathResultType.Number ,
+ /* FunctionType.FuncSum */ XPathResultType.Number,
+ /* FunctionType.FuncFloor */ XPathResultType.Number,
+ /* FunctionType.FuncCeiling */ XPathResultType.Number,
+ /* FunctionType.FuncRound */ XPathResultType.Number,
/* FunctionType.FuncUserDefined */ XPathResultType.Any
};
}
private delegate bool cmpXslt(Operator.Op op, object val1, object val2);
- // Number, String, Boolean, NodeSet, Navigator
- private static readonly cmpXslt[][] s_CompXsltE = {
- new cmpXslt[] { new cmpXslt(cmpNumberNumber), null , null , null , null },
- new cmpXslt[] { new cmpXslt(cmpStringNumber), new cmpXslt(cmpStringStringE), null , null , null },
- new cmpXslt[] { new cmpXslt(cmpBoolNumberE ), new cmpXslt(cmpBoolStringE ), new cmpXslt(cmpBoolBoolE ), null , null },
+ // Number, String, Boolean, NodeSet, Navigator
+ private static readonly cmpXslt[][] s_CompXsltE =
+ {
+ new cmpXslt[] { new cmpXslt(cmpNumberNumber), null, null, null, null },
+ new cmpXslt[] { new cmpXslt(cmpStringNumber), new cmpXslt(cmpStringStringE), null, null, null },
+ new cmpXslt[] { new cmpXslt(cmpBoolNumberE ), new cmpXslt(cmpBoolStringE ), new cmpXslt(cmpBoolBoolE ), null, null },
new cmpXslt[] { new cmpXslt(cmpQueryNumber ), new cmpXslt(cmpQueryStringE ), new cmpXslt(cmpQueryBoolE ), new cmpXslt(cmpQueryQueryE ), null },
new cmpXslt[] { new cmpXslt(cmpRtfNumber ), new cmpXslt(cmpRtfStringE ), new cmpXslt(cmpRtfBoolE ), new cmpXslt(cmpRtfQueryE ), new cmpXslt(cmpRtfRtfE) },
};
- private static readonly cmpXslt[][] s_CompXsltO = {
- new cmpXslt[] { new cmpXslt(cmpNumberNumber), null , null , null , null },
- new cmpXslt[] { new cmpXslt(cmpStringNumber), new cmpXslt(cmpStringStringO), null , null , null },
- new cmpXslt[] { new cmpXslt(cmpBoolNumberO ), new cmpXslt(cmpBoolStringO ), new cmpXslt(cmpBoolBoolO ), null , null },
+ private static readonly cmpXslt[][] s_CompXsltO =
+ {
+ new cmpXslt[] { new cmpXslt(cmpNumberNumber), null, null, null, null },
+ new cmpXslt[] { new cmpXslt(cmpStringNumber), new cmpXslt(cmpStringStringO), null, null, null },
+ new cmpXslt[] { new cmpXslt(cmpBoolNumberO ), new cmpXslt(cmpBoolStringO ), new cmpXslt(cmpBoolBoolO ), null, null },
new cmpXslt[] { new cmpXslt(cmpQueryNumber ), new cmpXslt(cmpQueryStringO ), new cmpXslt(cmpQueryBoolO ), new cmpXslt(cmpQueryQueryO ), null },
new cmpXslt[] { new cmpXslt(cmpRtfNumber ), new cmpXslt(cmpRtfStringO ), new cmpXslt(cmpRtfBoolO ), new cmpXslt(cmpRtfQueryO ), new cmpXslt(cmpRtfRtfO) },
};
}
private static readonly XPathOperatorGroup[] s_operatorGroup = {
- /*Unknown */ XPathOperatorGroup.Unknown ,
- /*Or */ XPathOperatorGroup.Logical ,
- /*And */ XPathOperatorGroup.Logical ,
- /*Eq */ XPathOperatorGroup.Equality ,
- /*Ne */ XPathOperatorGroup.Equality ,
+ /*Unknown */ XPathOperatorGroup.Unknown,
+ /*Or */ XPathOperatorGroup.Logical,
+ /*And */ XPathOperatorGroup.Logical,
+ /*Eq */ XPathOperatorGroup.Equality,
+ /*Ne */ XPathOperatorGroup.Equality,
/*Lt */ XPathOperatorGroup.Relational,
/*Le */ XPathOperatorGroup.Relational,
/*Gt */ XPathOperatorGroup.Relational,
/*Multiply */ XPathOperatorGroup.Arithmetic,
/*Divide */ XPathOperatorGroup.Arithmetic,
/*Modulo */ XPathOperatorGroup.Arithmetic,
- /*UnaryMinus*/ XPathOperatorGroup.Negate ,
- /*Union */ XPathOperatorGroup.Union ,
+ /*UnaryMinus*/ XPathOperatorGroup.Negate,
+ /*Union */ XPathOperatorGroup.Union,
};
private static readonly QilNodeType[] s_qilOperator = {
- /*Unknown */ QilNodeType.Unknown ,
- /*Or */ QilNodeType.Or ,
- /*And */ QilNodeType.And ,
- /*Eq */ QilNodeType.Eq ,
- /*Ne */ QilNodeType.Ne ,
- /*Lt */ QilNodeType.Lt ,
- /*Le */ QilNodeType.Le ,
- /*Gt */ QilNodeType.Gt ,
- /*Ge */ QilNodeType.Ge ,
- /*Plus */ QilNodeType.Add ,
+ /*Unknown */ QilNodeType.Unknown,
+ /*Or */ QilNodeType.Or,
+ /*And */ QilNodeType.And,
+ /*Eq */ QilNodeType.Eq,
+ /*Ne */ QilNodeType.Ne,
+ /*Lt */ QilNodeType.Lt,
+ /*Le */ QilNodeType.Le,
+ /*Gt */ QilNodeType.Gt,
+ /*Ge */ QilNodeType.Ge,
+ /*Plus */ QilNodeType.Add,
/*Minus */ QilNodeType.Subtract,
/*Multiply */ QilNodeType.Multiply,
- /*Divide */ QilNodeType.Divide ,
- /*Modulo */ QilNodeType.Modulo ,
- /*UnaryMinus */ QilNodeType.Negate ,
+ /*Divide */ QilNodeType.Divide,
+ /*Modulo */ QilNodeType.Modulo,
+ /*UnaryMinus */ QilNodeType.Negate,
/*Union */ QilNodeType.Sequence,
};
/// </summary>
private static readonly XmlQueryCardinality[,] s_cardinalityProduct = {
// None Zero One ZeroOrOne More NotOne OneOrMore ZeroOrMore
- /* None */ { None, Zero, None , Zero , None , Zero , None , Zero },
- /* Zero */ { Zero, Zero, Zero , Zero , Zero , Zero , Zero , Zero },
- /* One */ { None, Zero, One , ZeroOrOne , More , NotOne, OneOrMore , ZeroOrMore },
- /* ZeroOrOne */ { Zero, Zero, ZeroOrOne , ZeroOrOne , NotOne, NotOne, ZeroOrMore, ZeroOrMore },
- /* More */ { None, Zero, More , NotOne , More , NotOne, More , NotOne },
- /* NotOne */ { Zero, Zero, NotOne , NotOne , NotOne, NotOne, NotOne , NotOne },
- /* OneOrMore */ { None, Zero, OneOrMore , ZeroOrMore, More , NotOne, OneOrMore , ZeroOrMore },
+ /* None */ { None, Zero, None, Zero, None, Zero, None, Zero },
+ /* Zero */ { Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero },
+ /* One */ { None, Zero, One, ZeroOrOne, More, NotOne, OneOrMore, ZeroOrMore },
+ /* ZeroOrOne */ { Zero, Zero, ZeroOrOne, ZeroOrOne, NotOne, NotOne, ZeroOrMore, ZeroOrMore },
+ /* More */ { None, Zero, More, NotOne, More, NotOne, More, NotOne },
+ /* NotOne */ { Zero, Zero, NotOne, NotOne, NotOne, NotOne, NotOne, NotOne },
+ /* OneOrMore */ { None, Zero, OneOrMore, ZeroOrMore, More, NotOne, OneOrMore, ZeroOrMore },
/* ZeroOrMore */ { Zero, Zero, ZeroOrMore, ZeroOrMore, NotOne, NotOne, ZeroOrMore, ZeroOrMore }
};
/// </summary>
private static readonly XmlQueryCardinality[,] s_cardinalitySum = {
// None Zero One ZeroOrOne More NotOne OneOrMore ZeroOrMore
- /* None */ { None , Zero , One , ZeroOrOne , More, NotOne , OneOrMore, ZeroOrMore},
- /* Zero */ { Zero , Zero , One , ZeroOrOne , More, NotOne , OneOrMore, ZeroOrMore},
- /* One */ { One , One , More , OneOrMore , More, OneOrMore , More , OneOrMore },
- /* ZeroOrOne */ { ZeroOrOne , ZeroOrOne , OneOrMore, ZeroOrMore, More, ZeroOrMore, OneOrMore, ZeroOrMore},
- /* More */ { More , More , More , More , More, More , More , More },
- /* NotOne */ { NotOne , NotOne , OneOrMore, ZeroOrMore, More, NotOne , OneOrMore, ZeroOrMore},
- /* OneOrMore */ { OneOrMore , OneOrMore , More , OneOrMore , More, OneOrMore , More , OneOrMore },
+ /* None */ { None, Zero, One, ZeroOrOne, More, NotOne, OneOrMore, ZeroOrMore},
+ /* Zero */ { Zero, Zero, One, ZeroOrOne, More, NotOne, OneOrMore, ZeroOrMore},
+ /* One */ { One, One, More, OneOrMore, More, OneOrMore, More, OneOrMore },
+ /* ZeroOrOne */ { ZeroOrOne, ZeroOrOne, OneOrMore, ZeroOrMore, More, ZeroOrMore, OneOrMore, ZeroOrMore},
+ /* More */ { More, More, More, More, More, More, More, More },
+ /* NotOne */ { NotOne, NotOne, OneOrMore, ZeroOrMore, More, NotOne, OneOrMore, ZeroOrMore},
+ /* OneOrMore */ { OneOrMore, OneOrMore, More, OneOrMore, More, OneOrMore, More, OneOrMore },
/* ZeroOrMore */ { ZeroOrMore, ZeroOrMore, OneOrMore, ZeroOrMore, More, ZeroOrMore, OneOrMore, ZeroOrMore}
};
#endregion
/// String representation.
/// </summary>
private static readonly string[] s_toString = {
- /* None */ "" ,
- /* Zero */ "?" ,
- /* One */ "" ,
- /* ZeroOrOne */ "?" ,
- /* More */ "+" ,
- /* NotOne */ "*" ,
- /* OneOrMore */ "+" ,
+ /* None */ "",
+ /* Zero */ "?",
+ /* One */ "",
+ /* ZeroOrOne */ "?",
+ /* More */ "+",
+ /* NotOne */ "*",
+ /* OneOrMore */ "+",
/* ZeroOrMore */ "*"
};
/*Le */ XslFlags.Boolean,
/*Gt */ XslFlags.Boolean,
/*Ge */ XslFlags.Boolean,
- /*Plus */ XslFlags.Number ,
- /*Minus */ XslFlags.Number ,
- /*Multiply */ XslFlags.Number ,
- /*Divide */ XslFlags.Number ,
- /*Modulo */ XslFlags.Number ,
- /*UnaryMinus*/ XslFlags.Number ,
+ /*Plus */ XslFlags.Number,
+ /*Minus */ XslFlags.Number,
+ /*Multiply */ XslFlags.Number,
+ /*Divide */ XslFlags.Number,
+ /*Modulo */ XslFlags.Number,
+ /*UnaryMinus*/ XslFlags.Number,
/*Union */ XslFlags.Nodeset,
};
}
private readonly XsltAttribute[] _stylesheetAttributes = {
- new XsltAttribute("version" , V1Req | V2Req),
- new XsltAttribute("id" , V1Opt | V2Opt),
- new XsltAttribute("default-validation" , V2Opt),
- new XsltAttribute("input-type-annotations", V2Opt),
+ new XsltAttribute("version", V1Req | V2Req),
+ new XsltAttribute("id", V1Opt | V2Opt),
+ new XsltAttribute("default-validation", V2Opt),
+ new XsltAttribute("input-type-annotations", V2Opt),
};
private void LoadRealStylesheet()
{
}
private readonly XsltAttribute[] _outputAttributes = {
- new XsltAttribute("name" , V2Opt),
- new XsltAttribute("method" , V1Opt | V2Opt),
- new XsltAttribute("byte-order-mark" , V2Opt),
+ new XsltAttribute("name", V2Opt),
+ new XsltAttribute("method", V1Opt | V2Opt),
+ new XsltAttribute("byte-order-mark", V2Opt),
new XsltAttribute("cdata-section-elements", V1Opt | V2Opt),
- new XsltAttribute("doctype-public" , V1Opt | V2Opt),
- new XsltAttribute("doctype-system" , V1Opt | V2Opt),
- new XsltAttribute("encoding" , V1Opt | V2Opt),
- new XsltAttribute("escape-uri-attributes" , V2Opt),
- new XsltAttribute("include-content-type" , V2Opt),
- new XsltAttribute("indent" , V1Opt | V2Opt),
- new XsltAttribute("media-type" , V1Opt | V2Opt),
- new XsltAttribute("normalization-form" , V2Opt),
- new XsltAttribute("omit-xml-declaration" , V1Opt | V2Opt),
- new XsltAttribute("standalone" , V1Opt | V2Opt),
- new XsltAttribute("undeclare-prefixes" , V2Opt),
- new XsltAttribute("use-character-maps" , V2Opt),
- new XsltAttribute("version" , V1Opt | V2Opt)
+ new XsltAttribute("doctype-public", V1Opt | V2Opt),
+ new XsltAttribute("doctype-system", V1Opt | V2Opt),
+ new XsltAttribute("encoding", V1Opt | V2Opt),
+ new XsltAttribute("escape-uri-attributes", V2Opt),
+ new XsltAttribute("include-content-type", V2Opt),
+ new XsltAttribute("indent", V1Opt | V2Opt),
+ new XsltAttribute("media-type", V1Opt | V2Opt),
+ new XsltAttribute("normalization-form", V2Opt),
+ new XsltAttribute("omit-xml-declaration", V1Opt | V2Opt),
+ new XsltAttribute("standalone", V1Opt | V2Opt),
+ new XsltAttribute("undeclare-prefixes", V2Opt),
+ new XsltAttribute("use-character-maps", V2Opt),
+ new XsltAttribute("version", V1Opt | V2Opt)
};
private void LoadOutput()
{
}
private readonly XsltAttribute[] _keyAttributes = {
- new XsltAttribute("name" , V1Req | V2Req),
- new XsltAttribute("match" , V1Req | V2Req),
- new XsltAttribute("use" , V1Req | V2Opt),
- new XsltAttribute("collation", V2Opt)
+ new XsltAttribute("name", V1Req | V2Req),
+ new XsltAttribute("match", V1Req | V2Req),
+ new XsltAttribute("use", V1Req | V2Opt),
+ new XsltAttribute("collation", V2Opt)
};
private void LoadKey(NsDecl stylesheetNsList)
{
}
private readonly XsltAttribute[] _decimalFormatAttributes = {
- new XsltAttribute("name" , V1Opt | V2Opt),
- new XsltAttribute("infinity" , V1Opt | V2Opt),
- new XsltAttribute("NaN" , V1Opt | V2Opt),
- new XsltAttribute("decimal-separator" , V1Opt | V2Opt),
+ new XsltAttribute("name", V1Opt | V2Opt),
+ new XsltAttribute("infinity", V1Opt | V2Opt),
+ new XsltAttribute("NaN", V1Opt | V2Opt),
+ new XsltAttribute("decimal-separator", V1Opt | V2Opt),
new XsltAttribute("grouping-separator", V1Opt | V2Opt),
- new XsltAttribute("percent" , V1Opt | V2Opt),
- new XsltAttribute("per-mille" , V1Opt | V2Opt),
- new XsltAttribute("zero-digit" , V1Opt | V2Opt),
- new XsltAttribute("digit" , V1Opt | V2Opt),
- new XsltAttribute("pattern-separator" , V1Opt | V2Opt),
- new XsltAttribute("minus-sign" , V1Opt | V2Opt)
+ new XsltAttribute("percent", V1Opt | V2Opt),
+ new XsltAttribute("per-mille", V1Opt | V2Opt),
+ new XsltAttribute("zero-digit", V1Opt | V2Opt),
+ new XsltAttribute("digit", V1Opt | V2Opt),
+ new XsltAttribute("pattern-separator", V1Opt | V2Opt),
+ new XsltAttribute("minus-sign", V1Opt | V2Opt)
};
private void LoadDecimalFormat(NsDecl stylesheetNsList)
{
private readonly XsltAttribute[] _namespaceAliasAttributes = {
new XsltAttribute("stylesheet-prefix", V1Req | V2Req),
- new XsltAttribute("result-prefix" , V1Req | V2Req)
+ new XsltAttribute("result-prefix", V1Req | V2Req)
};
private void LoadNamespaceAlias(NsDecl stylesheetNsList)
{
}
private readonly XsltAttribute[] _attributeSetAttributes = {
- new XsltAttribute("name" , V1Req | V2Req),
+ new XsltAttribute("name", V1Req | V2Req),
new XsltAttribute("use-attribute-sets", V1Opt | V2Opt)
};
private void LoadAttributeSet(NsDecl stylesheetNsList)
//: http://www.w3.org/TR/xslt#section-Defining-Template-Rules
private readonly XsltAttribute[] _templateAttributes = {
- new XsltAttribute("match" , V1Opt | V2Opt),
- new XsltAttribute("name" , V1Opt | V2Opt),
+ new XsltAttribute("match", V1Opt | V2Opt),
+ new XsltAttribute("name", V1Opt | V2Opt),
new XsltAttribute("priority", V1Opt | V2Opt),
- new XsltAttribute("mode" , V1Opt | V2Opt),
- new XsltAttribute("as" , V2Opt)
+ new XsltAttribute("mode", V1Opt | V2Opt),
+ new XsltAttribute("as", V2Opt)
};
private void LoadTemplate(NsDecl stylesheetNsList)
{
private readonly XsltAttribute[] _scriptAttributes = {
new XsltAttribute("implements-prefix", V1Req | V2Req),
- new XsltAttribute("language" , V1Opt | V2Opt)
+ new XsltAttribute("language", V1Opt | V2Opt)
};
private void LoadMsScript(NsDecl stylesheetNsList)
{
// http://www.w3.org/TR/xslt#section-Applying-Template-Rules
private readonly XsltAttribute[] _applyTemplatesAttributes = {
new XsltAttribute("select", V1Opt | V2Opt),
- new XsltAttribute("mode" , V1Opt | V2Opt)
+ new XsltAttribute("mode", V1Opt | V2Opt)
};
private XslNode XslApplyTemplates()
{
// http://www.w3.org/TR/xslt#copying
// http://www.w3.org/TR/xslt20/#element-copy
private readonly XsltAttribute[] _copyAttributes = {
- new XsltAttribute("copy-namespaces" , V2Opt),
- new XsltAttribute("inherit-namespaces", V2Opt),
+ new XsltAttribute("copy-namespaces", V2Opt),
+ new XsltAttribute("inherit-namespaces", V2Opt),
new XsltAttribute("use-attribute-sets", V1Opt | V2Opt),
- new XsltAttribute("type" , V2Opt),
- new XsltAttribute("validation" , V2Opt)
+ new XsltAttribute("type", V2Opt),
+ new XsltAttribute("validation", V2Opt)
};
private XslNode XslCopy()
{
}
private readonly XsltAttribute[] _copyOfAttributes = {
- new XsltAttribute("select" , V1Req | V2Req),
- new XsltAttribute("copy-namespaces", V2Opt),
- new XsltAttribute("type" , V2Opt),
- new XsltAttribute("validation" , V2Opt)
+ new XsltAttribute("select", V1Req | V2Req),
+ new XsltAttribute("copy-namespaces", V2Opt),
+ new XsltAttribute("type", V2Opt),
+ new XsltAttribute("validation", V2Opt)
};
private XslNode XslCopyOf()
{
// http://www.w3.org/TR/xslt#message
// http://www.w3.org/TR/xslt20/#element-message
private readonly XsltAttribute[] _messageAttributes = {
- new XsltAttribute("select" , V2Opt),
+ new XsltAttribute("select", V2Opt),
new XsltAttribute("terminate", V1Opt | V2Opt)
};
private XslNode XslMessage()
// http://www.w3.org/TR/xslt#number
// http://www.w3.org/TR/xslt20/#element-number
private readonly XsltAttribute[] _numberAttributes = {
- new XsltAttribute("value" , V1Opt | V2Opt),
- new XsltAttribute("select" , V2Opt),
- new XsltAttribute("level" , V1Opt | V2Opt),
- new XsltAttribute("count" , V1Opt | V2Opt),
- new XsltAttribute("from" , V1Opt | V2Opt),
- new XsltAttribute("format" , V1Opt | V2Opt),
- new XsltAttribute("lang" , V1Opt | V2Opt),
- new XsltAttribute("letter-value" , V1Opt | V2Opt),
- new XsltAttribute("ordinal" , V2Opt),
+ new XsltAttribute("value", V1Opt | V2Opt),
+ new XsltAttribute("select", V2Opt),
+ new XsltAttribute("level", V1Opt | V2Opt),
+ new XsltAttribute("count", V1Opt | V2Opt),
+ new XsltAttribute("from", V1Opt | V2Opt),
+ new XsltAttribute("format", V1Opt | V2Opt),
+ new XsltAttribute("lang", V1Opt | V2Opt),
+ new XsltAttribute("letter-value", V1Opt | V2Opt),
+ new XsltAttribute("ordinal", V2Opt),
new XsltAttribute("grouping-separator", V1Opt | V2Opt),
- new XsltAttribute("grouping-size" , V1Opt | V2Opt)
+ new XsltAttribute("grouping-size", V1Opt | V2Opt)
};
private XslNode XslNumber()
{
// http://www.w3.org/TR/xslt#value-of
private readonly XsltAttribute[] _valueOfAttributes = {
- new XsltAttribute("select" , V1Req | V2Opt),
- new XsltAttribute("separator" , V2Opt),
+ new XsltAttribute("select", V1Req | V2Opt),
+ new XsltAttribute("separator", V2Opt),
new XsltAttribute("disable-output-escaping", V1Opt | V2Opt)
};
private XslNode XslValueOf()
// xsl:param http://www.w3.org/TR/xslt#element-param
// xsl:with-param http://www.w3.org/TR/xslt#element-with-param
private readonly XsltAttribute[] _variableAttributes = {
- new XsltAttribute("name" , V1Req | V2Req),
- new XsltAttribute("select" , V1Opt | V2Opt),
- new XsltAttribute("as" , V2Opt),
- new XsltAttribute("required", 0),
- new XsltAttribute("tunnel" , 0)
+ new XsltAttribute("name", V1Req | V2Req),
+ new XsltAttribute("select", V1Opt | V2Opt),
+ new XsltAttribute("as", V2Opt),
+ new XsltAttribute("required", 0),
+ new XsltAttribute("tunnel", 0)
};
private readonly XsltAttribute[] _paramAttributes = {
- new XsltAttribute("name" , V1Req | V2Req),
- new XsltAttribute("select" , V1Opt | V2Opt),
- new XsltAttribute("as" , V2Opt),
- new XsltAttribute("required", V2Opt),
- new XsltAttribute("tunnel" , V2Opt)
+ new XsltAttribute("name", V1Req | V2Req),
+ new XsltAttribute("select", V1Opt | V2Opt),
+ new XsltAttribute("as", V2Opt),
+ new XsltAttribute("required", V2Opt),
+ new XsltAttribute("tunnel", V2Opt)
};
private readonly XsltAttribute[] _withParamAttributes = {
- new XsltAttribute("name" , V1Req | V2Req),
- new XsltAttribute("select" , V1Opt | V2Opt),
- new XsltAttribute("as" , V2Opt),
- new XsltAttribute("required", 0),
- new XsltAttribute("tunnel" , V2Opt)
+ new XsltAttribute("name", V1Req | V2Req),
+ new XsltAttribute("select", V1Opt | V2Opt),
+ new XsltAttribute("as", V2Opt),
+ new XsltAttribute("required", 0),
+ new XsltAttribute("tunnel", V2Opt)
};
private VarPar XslVarPar()
{
// http://www.w3.org/TR/xslt#section-Creating-Processing-Instructions
// http://www.w3.org/TR/xslt20/#element-processing-instruction
private readonly XsltAttribute[] _processingInstructionAttributes = {
- new XsltAttribute("name" , V1Req | V2Req),
- new XsltAttribute("select", V2Opt)
+ new XsltAttribute("name", V1Req | V2Req),
+ new XsltAttribute("select", V2Opt)
};
private XslNode XslProcessingInstruction()
{
// http://www.w3.org/TR/xslt#section-Creating-Elements-with-xsl:element
// http://www.w3.org/TR/xslt20/#element-element
private readonly XsltAttribute[] _elementAttributes = {
- new XsltAttribute("name" , V1Req | V2Req),
- new XsltAttribute("namespace" , V1Opt | V2Opt),
- new XsltAttribute("inherit-namespaces", V2Opt),
- new XsltAttribute("use-attribute-sets" , V1Opt | V2Opt),
- new XsltAttribute("type" , V2Opt),
- new XsltAttribute("validation" , V2Opt)
+ new XsltAttribute("name", V1Req | V2Req),
+ new XsltAttribute("namespace", V1Opt | V2Opt),
+ new XsltAttribute("inherit-namespaces", V2Opt),
+ new XsltAttribute("use-attribute-sets", V1Opt | V2Opt),
+ new XsltAttribute("type", V2Opt),
+ new XsltAttribute("validation", V2Opt)
};
private XslNode XslElement()
{
// http://www.w3.org/TR/xslt#creating-attributes
// http://www.w3.org/TR/xslt20#creating-attributes
private readonly XsltAttribute[] _attributeAttributes = {
- new XsltAttribute("name" , V1Req | V2Req),
- new XsltAttribute("namespace" , V1Opt | V2Opt),
- new XsltAttribute("select" , V2Opt),
- new XsltAttribute("separator" , V2Opt),
- new XsltAttribute("type" , V2Opt),
- new XsltAttribute("validation", V2Opt)
+ new XsltAttribute("name", V1Req | V2Req),
+ new XsltAttribute("namespace", V1Opt | V2Opt),
+ new XsltAttribute("select", V2Opt),
+ new XsltAttribute("separator", V2Opt),
+ new XsltAttribute("type", V2Opt),
+ new XsltAttribute("validation", V2Opt)
};
private XslNode XslAttribute()
{
// http://www.w3.org/TR/xslt#sorting
// http://www.w3.org/TR/xslt20/#element-sort
private readonly XsltAttribute[] _sortAttributes = {
- new XsltAttribute("select" , V1Opt | V2Opt),
- new XsltAttribute("lang" , V1Opt | V2Opt),
- new XsltAttribute("order" , V1Opt | V2Opt),
- new XsltAttribute("collation" , V1Opt | V2Opt),
- new XsltAttribute("stable" , V1Opt | V2Opt),
+ new XsltAttribute("select", V1Opt | V2Opt),
+ new XsltAttribute("lang", V1Opt | V2Opt),
+ new XsltAttribute("order", V1Opt | V2Opt),
+ new XsltAttribute("collation", V1Opt | V2Opt),
+ new XsltAttribute("stable", V1Opt | V2Opt),
new XsltAttribute("case-order", V1Opt | V2Opt),
- new XsltAttribute("data-type" , V1Opt | V2Opt)
+ new XsltAttribute("data-type", V1Opt | V2Opt)
};
private XslNode XslSort(int sortNumber)
{
}
private static readonly OpCode[] s_convOpCodes = new OpCode[] {
- OpCodes.Nop,//Empty = 0,
- OpCodes.Nop,//Object = 1,
- OpCodes.Nop,//DBNull = 2,
- OpCodes.Conv_I1,//Boolean = 3,
- OpCodes.Conv_I2,//Char = 4,
- OpCodes.Conv_I1,//SByte = 5,
- OpCodes.Conv_U1,//Byte = 6,
- OpCodes.Conv_I2,//Int16 = 7,
- OpCodes.Conv_U2,//UInt16 = 8,
- OpCodes.Conv_I4,//Int32 = 9,
- OpCodes.Conv_U4,//UInt32 = 10,
- OpCodes.Conv_I8,//Int64 = 11,
- OpCodes.Conv_U8,//UInt64 = 12,
- OpCodes.Conv_R4,//Single = 13,
- OpCodes.Conv_R8,//Double = 14,
- OpCodes.Nop,//Decimal = 15,
- OpCodes.Nop,//DateTime = 16,
- OpCodes.Nop,//17
- OpCodes.Nop,//String = 18,
+ OpCodes.Nop, //Empty = 0,
+ OpCodes.Nop, //Object = 1,
+ OpCodes.Nop, //DBNull = 2,
+ OpCodes.Conv_I1, //Boolean = 3,
+ OpCodes.Conv_I2, //Char = 4,
+ OpCodes.Conv_I1, //SByte = 5,
+ OpCodes.Conv_U1, //Byte = 6,
+ OpCodes.Conv_I2, //Int16 = 7,
+ OpCodes.Conv_U2, //UInt16 = 8,
+ OpCodes.Conv_I4, //Int32 = 9,
+ OpCodes.Conv_U4, //UInt32 = 10,
+ OpCodes.Conv_I8, //Int64 = 11,
+ OpCodes.Conv_U8, //UInt64 = 12,
+ OpCodes.Conv_R4, //Single = 13,
+ OpCodes.Conv_R8, //Double = 14,
+ OpCodes.Nop, //Decimal = 15,
+ OpCodes.Nop, //DateTime = 16,
+ OpCodes.Nop, //17
+ OpCodes.Nop, //String = 18,
};
private static readonly OpCode[] s_ldindOpCodes = new OpCode[] {
- OpCodes.Nop,//Empty = 0,
- OpCodes.Nop,//Object = 1,
- OpCodes.Nop,//DBNull = 2,
- OpCodes.Ldind_I1,//Boolean = 3,
- OpCodes.Ldind_I2,//Char = 4,
- OpCodes.Ldind_I1,//SByte = 5,
- OpCodes.Ldind_U1,//Byte = 6,
- OpCodes.Ldind_I2,//Int16 = 7,
- OpCodes.Ldind_U2,//UInt16 = 8,
- OpCodes.Ldind_I4,//Int32 = 9,
- OpCodes.Ldind_U4,//UInt32 = 10,
- OpCodes.Ldind_I8,//Int64 = 11,
- OpCodes.Ldind_I8,//UInt64 = 12,
- OpCodes.Ldind_R4,//Single = 13,
- OpCodes.Ldind_R8,//Double = 14,
- OpCodes.Nop,//Decimal = 15,
- OpCodes.Nop,//DateTime = 16,
- OpCodes.Nop,//17
- OpCodes.Ldind_Ref,//String = 18,
+ OpCodes.Nop, //Empty = 0,
+ OpCodes.Nop, //Object = 1,
+ OpCodes.Nop, //DBNull = 2,
+ OpCodes.Ldind_I1, //Boolean = 3,
+ OpCodes.Ldind_I2, //Char = 4,
+ OpCodes.Ldind_I1, //SByte = 5,
+ OpCodes.Ldind_U1, //Byte = 6,
+ OpCodes.Ldind_I2, //Int16 = 7,
+ OpCodes.Ldind_U2, //UInt16 = 8,
+ OpCodes.Ldind_I4, //Int32 = 9,
+ OpCodes.Ldind_U4, //UInt32 = 10,
+ OpCodes.Ldind_I8, //Int64 = 11,
+ OpCodes.Ldind_I8, //UInt64 = 12,
+ OpCodes.Ldind_R4, //Single = 13,
+ OpCodes.Ldind_R8, //Double = 14,
+ OpCodes.Nop, //Decimal = 15,
+ OpCodes.Nop, //DateTime = 16,
+ OpCodes.Nop, //17
+ OpCodes.Ldind_Ref, //String = 18,
};
private static readonly OpCode[] s_stindOpCodes = new OpCode[] {
- OpCodes.Nop,//Empty = 0,
- OpCodes.Nop,//Object = 1,
- OpCodes.Nop,//DBNull = 2,
- OpCodes.Stind_I1,//Boolean = 3,
- OpCodes.Stind_I2,//Char = 4,
- OpCodes.Stind_I1,//SByte = 5,
- OpCodes.Stind_I1,//Byte = 6,
- OpCodes.Stind_I2,//Int16 = 7,
- OpCodes.Stind_I2,//UInt16 = 8,
- OpCodes.Stind_I4,//Int32 = 9,
- OpCodes.Stind_I4,//UInt32 = 10,
- OpCodes.Stind_I8,//Int64 = 11,
- OpCodes.Stind_I8,//UInt64 = 12,
- OpCodes.Stind_R4,//Single = 13,
- OpCodes.Stind_R8,//Double = 14,
- OpCodes.Nop,//Decimal = 15,
- OpCodes.Nop,//DateTime = 16,
- OpCodes.Nop,//17
- OpCodes.Stind_Ref,//String = 18,
+ OpCodes.Nop, //Empty = 0,
+ OpCodes.Nop, //Object = 1,
+ OpCodes.Nop, //DBNull = 2,
+ OpCodes.Stind_I1, //Boolean = 3,
+ OpCodes.Stind_I2, //Char = 4,
+ OpCodes.Stind_I1, //SByte = 5,
+ OpCodes.Stind_I1, //Byte = 6,
+ OpCodes.Stind_I2, //Int16 = 7,
+ OpCodes.Stind_I2, //UInt16 = 8,
+ OpCodes.Stind_I4, //Int32 = 9,
+ OpCodes.Stind_I4, //UInt32 = 10,
+ OpCodes.Stind_I8, //Int64 = 11,
+ OpCodes.Stind_I8, //UInt64 = 12,
+ OpCodes.Stind_R4, //Single = 13,
+ OpCodes.Stind_R8, //Double = 14,
+ OpCodes.Nop, //Decimal = 15,
+ OpCodes.Nop, //DateTime = 16,
+ OpCodes.Nop, //17
+ OpCodes.Stind_Ref, //String = 18,
};
private static void Convert(ILGenerator il, Type source, Type target, bool isAddress)
return -1;
}
- private static int SumRawDataSizes(ImmutableArray<SerializedSection> sections,SectionCharacteristics characteristics)
+ private static int SumRawDataSizes(ImmutableArray<SerializedSection> sections, SectionCharacteristics characteristics)
{
int result = 0;
for (int i = 0; i < sections.Length; i++)
public NativeCppClassAttribute() { }
}
- [AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Interface,AllowMultiple=true, Inherited=false)]
+ [AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Interface, AllowMultiple=true, Inherited=false)]
public sealed class RequiredAttributeAttribute : Attribute
{
public RequiredAttributeAttribute(Type requiredContract) => RequiredContract = requiredContract;
// The ACE was too long - it would overflow the ACL maximum length
//
- throw new ArgumentException(
- SR.ArgumentException_InvalidAclBinaryForm ,
-nameof(binaryForm));
+ throw new ArgumentException(SR.ArgumentException_InvalidAclBinaryForm, nameof(binaryForm));
}
_aces.Add( ace );
InvalidParameter:
throw new ArgumentException(
- SR.ArgumentException_InvalidAclBinaryForm ,
+ SR.ArgumentException_InvalidAclBinaryForm,
nameof(binaryForm));
}
{
if ( auditFlags == AuditFlags.None )
{
- throw new ArgumentException(
- SR.Arg_EnumAtLeastOneFlag ,
-nameof(auditFlags));
+ throw new ArgumentException(SR.Arg_EnumAtLeastOneFlag, nameof(auditFlags));
}
else if (( auditFlags & ~( AuditFlags.Success | AuditFlags.Failure )) != 0 )
{
- throw new ArgumentOutOfRangeException(
-nameof(auditFlags),
- SR.ArgumentOutOfRange_Enum );
+ throw new ArgumentOutOfRangeException(nameof(auditFlags), SR.ArgumentOutOfRange_Enum );
}
_flags = auditFlags;
if (array.Rank != 1)
throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
if (index < 0 || index >= array.Length)
- throw new ArgumentOutOfRangeException(nameof(index),SR.ArgumentOutOfRange_Index);
+ throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
if (index + Count > array.Length)
throw new ArgumentException(SR.Argument_InvalidOffLen);
private static readonly FileInfo s_rootStoreFileInfo = SafeOpenRootFileInfo();
// Use non-Value-Tuple so that it's an atomic update.
- private static Tuple<SafeX509StackHandle,SafeX509StackHandle> s_nativeCollections;
+ private static Tuple<SafeX509StackHandle, SafeX509StackHandle> s_nativeCollections;
private static DateTime s_directoryCertsLastWrite;
private static DateTime s_fileCertsLastWrite;
public CompiledRegexRunner() { }
- public void SetDelegates(Action<RegexRunner> go, Func<RegexRunner,bool> firstChar, Action<RegexRunner> trackCount)
+ public void SetDelegates(Action<RegexRunner> go, Func<RegexRunner, bool> firstChar, Action<RegexRunner> trackCount)
{
_goMethod = go;
_findFirstCharMethod = firstChar;
**/
// Has to be sorted by the first column
private static readonly string[][] s_propTable = {
- new[] {"IsAlphabeticPresentationForms", "\uFB00\uFB50"},
- new[] {"IsArabic", "\u0600\u0700"},
- new[] {"IsArabicPresentationForms-A", "\uFB50\uFE00"},
- new[] {"IsArabicPresentationForms-B", "\uFE70\uFF00"},
- new[] {"IsArmenian", "\u0530\u0590"},
- new[] {"IsArrows", "\u2190\u2200"},
- new[] {"IsBasicLatin", "\u0000\u0080"},
- new[] {"IsBengali", "\u0980\u0A00"},
- new[] {"IsBlockElements", "\u2580\u25A0"},
- new[] {"IsBopomofo", "\u3100\u3130"},
- new[] {"IsBopomofoExtended", "\u31A0\u31C0"},
- new[] {"IsBoxDrawing", "\u2500\u2580"},
- new[] {"IsBraillePatterns", "\u2800\u2900"},
- new[] {"IsBuhid", "\u1740\u1760"},
- new[] {"IsCJKCompatibility", "\u3300\u3400"},
- new[] {"IsCJKCompatibilityForms", "\uFE30\uFE50"},
- new[] {"IsCJKCompatibilityIdeographs", "\uF900\uFB00"},
- new[] {"IsCJKRadicalsSupplement", "\u2E80\u2F00"},
- new[] {"IsCJKSymbolsandPunctuation", "\u3000\u3040"},
- new[] {"IsCJKUnifiedIdeographs", "\u4E00\uA000"},
- new[] {"IsCJKUnifiedIdeographsExtensionA", "\u3400\u4DC0"},
- new[] {"IsCherokee", "\u13A0\u1400"},
- new[] {"IsCombiningDiacriticalMarks", "\u0300\u0370"},
- new[] {"IsCombiningDiacriticalMarksforSymbols","\u20D0\u2100"},
- new[] {"IsCombiningHalfMarks", "\uFE20\uFE30"},
- new[] {"IsCombiningMarksforSymbols", "\u20D0\u2100"},
- new[] {"IsControlPictures", "\u2400\u2440"},
- new[] {"IsCurrencySymbols", "\u20A0\u20D0"},
- new[] {"IsCyrillic", "\u0400\u0500"},
- new[] {"IsCyrillicSupplement", "\u0500\u0530"},
- new[] {"IsDevanagari", "\u0900\u0980"},
- new[] {"IsDingbats", "\u2700\u27C0"},
- new[] {"IsEnclosedAlphanumerics", "\u2460\u2500"},
- new[] {"IsEnclosedCJKLettersandMonths", "\u3200\u3300"},
- new[] {"IsEthiopic", "\u1200\u1380"},
- new[] {"IsGeneralPunctuation", "\u2000\u2070"},
- new[] {"IsGeometricShapes", "\u25A0\u2600"},
- new[] {"IsGeorgian", "\u10A0\u1100"},
- new[] {"IsGreek", "\u0370\u0400"},
- new[] {"IsGreekExtended", "\u1F00\u2000"},
- new[] {"IsGreekandCoptic", "\u0370\u0400"},
- new[] {"IsGujarati", "\u0A80\u0B00"},
- new[] {"IsGurmukhi", "\u0A00\u0A80"},
- new[] {"IsHalfwidthandFullwidthForms", "\uFF00\uFFF0"},
- new[] {"IsHangulCompatibilityJamo", "\u3130\u3190"},
- new[] {"IsHangulJamo", "\u1100\u1200"},
- new[] {"IsHangulSyllables", "\uAC00\uD7B0"},
- new[] {"IsHanunoo", "\u1720\u1740"},
- new[] {"IsHebrew", "\u0590\u0600"},
- new[] {"IsHighPrivateUseSurrogates", "\uDB80\uDC00"},
- new[] {"IsHighSurrogates", "\uD800\uDB80"},
- new[] {"IsHiragana", "\u3040\u30A0"},
- new[] {"IsIPAExtensions", "\u0250\u02B0"},
- new[] {"IsIdeographicDescriptionCharacters", "\u2FF0\u3000"},
- new[] {"IsKanbun", "\u3190\u31A0"},
- new[] {"IsKangxiRadicals", "\u2F00\u2FE0"},
- new[] {"IsKannada", "\u0C80\u0D00"},
- new[] {"IsKatakana", "\u30A0\u3100"},
- new[] {"IsKatakanaPhoneticExtensions", "\u31F0\u3200"},
- new[] {"IsKhmer", "\u1780\u1800"},
- new[] {"IsKhmerSymbols", "\u19E0\u1A00"},
- new[] {"IsLao", "\u0E80\u0F00"},
- new[] {"IsLatin-1Supplement", "\u0080\u0100"},
- new[] {"IsLatinExtended-A", "\u0100\u0180"},
- new[] {"IsLatinExtended-B", "\u0180\u0250"},
- new[] {"IsLatinExtendedAdditional", "\u1E00\u1F00"},
- new[] {"IsLetterlikeSymbols", "\u2100\u2150"},
- new[] {"IsLimbu", "\u1900\u1950"},
- new[] {"IsLowSurrogates", "\uDC00\uE000"},
- new[] {"IsMalayalam", "\u0D00\u0D80"},
- new[] {"IsMathematicalOperators", "\u2200\u2300"},
- new[] {"IsMiscellaneousMathematicalSymbols-A","\u27C0\u27F0"},
- new[] {"IsMiscellaneousMathematicalSymbols-B","\u2980\u2A00"},
- new[] {"IsMiscellaneousSymbols", "\u2600\u2700"},
- new[] {"IsMiscellaneousSymbolsandArrows", "\u2B00\u2C00"},
- new[] {"IsMiscellaneousTechnical", "\u2300\u2400"},
- new[] {"IsMongolian", "\u1800\u18B0"},
- new[] {"IsMyanmar", "\u1000\u10A0"},
- new[] {"IsNumberForms", "\u2150\u2190"},
- new[] {"IsOgham", "\u1680\u16A0"},
- new[] {"IsOpticalCharacterRecognition", "\u2440\u2460"},
- new[] {"IsOriya", "\u0B00\u0B80"},
- new[] {"IsPhoneticExtensions", "\u1D00\u1D80"},
- new[] {"IsPrivateUse", "\uE000\uF900"},
- new[] {"IsPrivateUseArea", "\uE000\uF900"},
- new[] {"IsRunic", "\u16A0\u1700"},
- new[] {"IsSinhala", "\u0D80\u0E00"},
- new[] {"IsSmallFormVariants", "\uFE50\uFE70"},
- new[] {"IsSpacingModifierLetters", "\u02B0\u0300"},
- new[] {"IsSpecials", "\uFFF0"},
- new[] {"IsSuperscriptsandSubscripts", "\u2070\u20A0"},
- new[] {"IsSupplementalArrows-A", "\u27F0\u2800"},
- new[] {"IsSupplementalArrows-B", "\u2900\u2980"},
- new[] {"IsSupplementalMathematicalOperators", "\u2A00\u2B00"},
- new[] {"IsSyriac", "\u0700\u0750"},
- new[] {"IsTagalog", "\u1700\u1720"},
- new[] {"IsTagbanwa", "\u1760\u1780"},
- new[] {"IsTaiLe", "\u1950\u1980"},
- new[] {"IsTamil", "\u0B80\u0C00"},
- new[] {"IsTelugu", "\u0C00\u0C80"},
- new[] {"IsThaana", "\u0780\u07C0"},
- new[] {"IsThai", "\u0E00\u0E80"},
- new[] {"IsTibetan", "\u0F00\u1000"},
- new[] {"IsUnifiedCanadianAboriginalSyllabics","\u1400\u1680"},
- new[] {"IsVariationSelectors", "\uFE00\uFE10"},
- new[] {"IsYiRadicals", "\uA490\uA4D0"},
- new[] {"IsYiSyllables", "\uA000\uA490"},
- new[] {"IsYijingHexagramSymbols", "\u4DC0\u4E00"},
- new[] {"_xmlC", /* Name Char */ "\u002D\u002F\u0030\u003B\u0041\u005B\u005F\u0060\u0061\u007B\u00B7\u00B8\u00C0\u00D7\u00D8\u00F7\u00F8\u0132\u0134\u013F\u0141\u0149\u014A\u017F\u0180\u01C4\u01CD\u01F1\u01F4\u01F6\u01FA\u0218\u0250\u02A9\u02BB\u02C2\u02D0\u02D2\u0300\u0346\u0360\u0362\u0386\u038B\u038C\u038D\u038E\u03A2\u03A3\u03CF\u03D0\u03D7\u03DA\u03DB\u03DC\u03DD\u03DE\u03DF\u03E0\u03E1\u03E2\u03F4\u0401\u040D\u040E\u0450\u0451\u045D\u045E\u0482\u0483\u0487\u0490\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04EC\u04EE\u04F6\u04F8\u04FA\u0531\u0557\u0559\u055A\u0561\u0587\u0591\u05A2\u05A3\u05BA\u05BB\u05BE\u05BF\u05C0\u05C1\u05C3\u05C4\u05C5\u05D0\u05EB\u05F0\u05F3\u0621\u063B\u0640\u0653\u0660\u066A\u0670\u06B8\u06BA\u06BF\u06C0\u06CF\u06D0\u06D4\u06D5\u06E9\u06EA\u06EE\u06F0\u06FA\u0901\u0904\u0905\u093A\u093C\u094E\u0951\u0955\u0958\u0964\u0966\u0970\u0981\u0984\u0985\u098D\u098F\u0991\u0993\u09A9\u09AA\u09B1\u09B2\u09B3\u09B6\u09BA\u09BC\u09BD\u09BE\u09C5\u09C7\u09C9\u09CB\u09CE\u09D7\u09D8\u09DC"
+ new[] {"IsAlphabeticPresentationForms", "\uFB00\uFB50"},
+ new[] {"IsArabic", "\u0600\u0700"},
+ new[] {"IsArabicPresentationForms-A", "\uFB50\uFE00"},
+ new[] {"IsArabicPresentationForms-B", "\uFE70\uFF00"},
+ new[] {"IsArmenian", "\u0530\u0590"},
+ new[] {"IsArrows", "\u2190\u2200"},
+ new[] {"IsBasicLatin", "\u0000\u0080"},
+ new[] {"IsBengali", "\u0980\u0A00"},
+ new[] {"IsBlockElements", "\u2580\u25A0"},
+ new[] {"IsBopomofo", "\u3100\u3130"},
+ new[] {"IsBopomofoExtended", "\u31A0\u31C0"},
+ new[] {"IsBoxDrawing", "\u2500\u2580"},
+ new[] {"IsBraillePatterns", "\u2800\u2900"},
+ new[] {"IsBuhid", "\u1740\u1760"},
+ new[] {"IsCJKCompatibility", "\u3300\u3400"},
+ new[] {"IsCJKCompatibilityForms", "\uFE30\uFE50"},
+ new[] {"IsCJKCompatibilityIdeographs", "\uF900\uFB00"},
+ new[] {"IsCJKRadicalsSupplement", "\u2E80\u2F00"},
+ new[] {"IsCJKSymbolsandPunctuation", "\u3000\u3040"},
+ new[] {"IsCJKUnifiedIdeographs", "\u4E00\uA000"},
+ new[] {"IsCJKUnifiedIdeographsExtensionA", "\u3400\u4DC0"},
+ new[] {"IsCherokee", "\u13A0\u1400"},
+ new[] {"IsCombiningDiacriticalMarks", "\u0300\u0370"},
+ new[] {"IsCombiningDiacriticalMarksforSymbols", "\u20D0\u2100"},
+ new[] {"IsCombiningHalfMarks", "\uFE20\uFE30"},
+ new[] {"IsCombiningMarksforSymbols", "\u20D0\u2100"},
+ new[] {"IsControlPictures", "\u2400\u2440"},
+ new[] {"IsCurrencySymbols", "\u20A0\u20D0"},
+ new[] {"IsCyrillic", "\u0400\u0500"},
+ new[] {"IsCyrillicSupplement", "\u0500\u0530"},
+ new[] {"IsDevanagari", "\u0900\u0980"},
+ new[] {"IsDingbats", "\u2700\u27C0"},
+ new[] {"IsEnclosedAlphanumerics", "\u2460\u2500"},
+ new[] {"IsEnclosedCJKLettersandMonths", "\u3200\u3300"},
+ new[] {"IsEthiopic", "\u1200\u1380"},
+ new[] {"IsGeneralPunctuation", "\u2000\u2070"},
+ new[] {"IsGeometricShapes", "\u25A0\u2600"},
+ new[] {"IsGeorgian", "\u10A0\u1100"},
+ new[] {"IsGreek", "\u0370\u0400"},
+ new[] {"IsGreekExtended", "\u1F00\u2000"},
+ new[] {"IsGreekandCoptic", "\u0370\u0400"},
+ new[] {"IsGujarati", "\u0A80\u0B00"},
+ new[] {"IsGurmukhi", "\u0A00\u0A80"},
+ new[] {"IsHalfwidthandFullwidthForms", "\uFF00\uFFF0"},
+ new[] {"IsHangulCompatibilityJamo", "\u3130\u3190"},
+ new[] {"IsHangulJamo", "\u1100\u1200"},
+ new[] {"IsHangulSyllables", "\uAC00\uD7B0"},
+ new[] {"IsHanunoo", "\u1720\u1740"},
+ new[] {"IsHebrew", "\u0590\u0600"},
+ new[] {"IsHighPrivateUseSurrogates", "\uDB80\uDC00"},
+ new[] {"IsHighSurrogates", "\uD800\uDB80"},
+ new[] {"IsHiragana", "\u3040\u30A0"},
+ new[] {"IsIPAExtensions", "\u0250\u02B0"},
+ new[] {"IsIdeographicDescriptionCharacters", "\u2FF0\u3000"},
+ new[] {"IsKanbun", "\u3190\u31A0"},
+ new[] {"IsKangxiRadicals", "\u2F00\u2FE0"},
+ new[] {"IsKannada", "\u0C80\u0D00"},
+ new[] {"IsKatakana", "\u30A0\u3100"},
+ new[] {"IsKatakanaPhoneticExtensions", "\u31F0\u3200"},
+ new[] {"IsKhmer", "\u1780\u1800"},
+ new[] {"IsKhmerSymbols", "\u19E0\u1A00"},
+ new[] {"IsLao", "\u0E80\u0F00"},
+ new[] {"IsLatin-1Supplement", "\u0080\u0100"},
+ new[] {"IsLatinExtended-A", "\u0100\u0180"},
+ new[] {"IsLatinExtended-B", "\u0180\u0250"},
+ new[] {"IsLatinExtendedAdditional", "\u1E00\u1F00"},
+ new[] {"IsLetterlikeSymbols", "\u2100\u2150"},
+ new[] {"IsLimbu", "\u1900\u1950"},
+ new[] {"IsLowSurrogates", "\uDC00\uE000"},
+ new[] {"IsMalayalam", "\u0D00\u0D80"},
+ new[] {"IsMathematicalOperators", "\u2200\u2300"},
+ new[] {"IsMiscellaneousMathematicalSymbols-A", "\u27C0\u27F0"},
+ new[] {"IsMiscellaneousMathematicalSymbols-B", "\u2980\u2A00"},
+ new[] {"IsMiscellaneousSymbols", "\u2600\u2700"},
+ new[] {"IsMiscellaneousSymbolsandArrows", "\u2B00\u2C00"},
+ new[] {"IsMiscellaneousTechnical", "\u2300\u2400"},
+ new[] {"IsMongolian", "\u1800\u18B0"},
+ new[] {"IsMyanmar", "\u1000\u10A0"},
+ new[] {"IsNumberForms", "\u2150\u2190"},
+ new[] {"IsOgham", "\u1680\u16A0"},
+ new[] {"IsOpticalCharacterRecognition", "\u2440\u2460"},
+ new[] {"IsOriya", "\u0B00\u0B80"},
+ new[] {"IsPhoneticExtensions", "\u1D00\u1D80"},
+ new[] {"IsPrivateUse", "\uE000\uF900"},
+ new[] {"IsPrivateUseArea", "\uE000\uF900"},
+ new[] {"IsRunic", "\u16A0\u1700"},
+ new[] {"IsSinhala", "\u0D80\u0E00"},
+ new[] {"IsSmallFormVariants", "\uFE50\uFE70"},
+ new[] {"IsSpacingModifierLetters", "\u02B0\u0300"},
+ new[] {"IsSpecials", "\uFFF0"},
+ new[] {"IsSuperscriptsandSubscripts", "\u2070\u20A0"},
+ new[] {"IsSupplementalArrows-A", "\u27F0\u2800"},
+ new[] {"IsSupplementalArrows-B", "\u2900\u2980"},
+ new[] {"IsSupplementalMathematicalOperators", "\u2A00\u2B00"},
+ new[] {"IsSyriac", "\u0700\u0750"},
+ new[] {"IsTagalog", "\u1700\u1720"},
+ new[] {"IsTagbanwa", "\u1760\u1780"},
+ new[] {"IsTaiLe", "\u1950\u1980"},
+ new[] {"IsTamil", "\u0B80\u0C00"},
+ new[] {"IsTelugu", "\u0C00\u0C80"},
+ new[] {"IsThaana", "\u0780\u07C0"},
+ new[] {"IsThai", "\u0E00\u0E80"},
+ new[] {"IsTibetan", "\u0F00\u1000"},
+ new[] {"IsUnifiedCanadianAboriginalSyllabics", "\u1400\u1680"},
+ new[] {"IsVariationSelectors", "\uFE00\uFE10"},
+ new[] {"IsYiRadicals", "\uA490\uA4D0"},
+ new[] {"IsYiSyllables", "\uA000\uA490"},
+ new[] {"IsYijingHexagramSymbols", "\u4DC0\u4E00"},
+ new[] {"_xmlC", /* Name Char */ "\u002D\u002F\u0030\u003B\u0041\u005B\u005F\u0060\u0061\u007B\u00B7\u00B8\u00C0\u00D7\u00D8\u00F7\u00F8\u0132\u0134\u013F\u0141\u0149\u014A\u017F\u0180\u01C4\u01CD\u01F1\u01F4\u01F6\u01FA\u0218\u0250\u02A9\u02BB\u02C2\u02D0\u02D2\u0300\u0346\u0360\u0362\u0386\u038B\u038C\u038D\u038E\u03A2\u03A3\u03CF\u03D0\u03D7\u03DA\u03DB\u03DC\u03DD\u03DE\u03DF\u03E0\u03E1\u03E2\u03F4\u0401\u040D\u040E\u0450\u0451\u045D\u045E\u0482\u0483\u0487\u0490\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04EC\u04EE\u04F6\u04F8\u04FA\u0531\u0557\u0559\u055A\u0561\u0587\u0591\u05A2\u05A3\u05BA\u05BB\u05BE\u05BF\u05C0\u05C1\u05C3\u05C4\u05C5\u05D0\u05EB\u05F0\u05F3\u0621\u063B\u0640\u0653\u0660\u066A\u0670\u06B8\u06BA\u06BF\u06C0\u06CF\u06D0\u06D4\u06D5\u06E9\u06EA\u06EE\u06F0\u06FA\u0901\u0904\u0905\u093A\u093C\u094E\u0951\u0955\u0958\u0964\u0966\u0970\u0981\u0984\u0985\u098D\u098F\u0991\u0993\u09A9\u09AA\u09B1\u09B2\u09B3\u09B6\u09BA\u09BC\u09BD\u09BE\u09C5\u09C7\u09C9\u09CB\u09CE\u09D7\u09D8\u09DC"
+"\u09DE\u09DF\u09E4\u09E6\u09F2\u0A02\u0A03\u0A05\u0A0B\u0A0F\u0A11\u0A13\u0A29\u0A2A\u0A31\u0A32\u0A34\u0A35\u0A37\u0A38\u0A3A\u0A3C\u0A3D\u0A3E\u0A43\u0A47\u0A49\u0A4B\u0A4E\u0A59\u0A5D\u0A5E\u0A5F\u0A66\u0A75\u0A81\u0A84\u0A85\u0A8C\u0A8D\u0A8E\u0A8F\u0A92\u0A93\u0AA9\u0AAA\u0AB1\u0AB2\u0AB4\u0AB5\u0ABA\u0ABC\u0AC6\u0AC7\u0ACA\u0ACB\u0ACE\u0AE0\u0AE1\u0AE6\u0AF0\u0B01\u0B04\u0B05\u0B0D\u0B0F\u0B11\u0B13\u0B29\u0B2A\u0B31\u0B32\u0B34\u0B36\u0B3A\u0B3C\u0B44\u0B47\u0B49\u0B4B\u0B4E\u0B56\u0B58\u0B5C\u0B5E\u0B5F\u0B62\u0B66\u0B70\u0B82\u0B84\u0B85\u0B8B\u0B8E\u0B91\u0B92\u0B96\u0B99\u0B9B\u0B9C\u0B9D\u0B9E\u0BA0\u0BA3\u0BA5\u0BA8\u0BAB\u0BAE\u0BB6\u0BB7\u0BBA\u0BBE\u0BC3\u0BC6\u0BC9\u0BCA\u0BCE\u0BD7\u0BD8\u0BE7\u0BF0\u0C01\u0C04\u0C05\u0C0D\u0C0E\u0C11\u0C12\u0C29\u0C2A\u0C34\u0C35\u0C3A\u0C3E\u0C45\u0C46\u0C49\u0C4A\u0C4E\u0C55\u0C57\u0C60\u0C62\u0C66\u0C70\u0C82\u0C84\u0C85\u0C8D\u0C8E\u0C91\u0C92\u0CA9\u0CAA\u0CB4\u0CB5\u0CBA\u0CBE\u0CC5\u0CC6\u0CC9\u0CCA\u0CCE\u0CD5\u0CD7\u0CDE\u0CDF\u0CE0\u0CE2"
+"\u0CE6\u0CF0\u0D02\u0D04\u0D05\u0D0D\u0D0E\u0D11\u0D12\u0D29\u0D2A\u0D3A\u0D3E\u0D44\u0D46\u0D49\u0D4A\u0D4E\u0D57\u0D58\u0D60\u0D62\u0D66\u0D70\u0E01\u0E2F\u0E30\u0E3B\u0E40\u0E4F\u0E50\u0E5A\u0E81\u0E83\u0E84\u0E85\u0E87\u0E89\u0E8A\u0E8B\u0E8D\u0E8E\u0E94\u0E98\u0E99\u0EA0\u0EA1\u0EA4\u0EA5\u0EA6\u0EA7\u0EA8\u0EAA\u0EAC\u0EAD\u0EAF\u0EB0\u0EBA\u0EBB\u0EBE\u0EC0\u0EC5\u0EC6\u0EC7\u0EC8\u0ECE\u0ED0\u0EDA\u0F18\u0F1A\u0F20\u0F2A\u0F35\u0F36\u0F37\u0F38\u0F39\u0F3A\u0F3E\u0F48\u0F49\u0F6A\u0F71\u0F85\u0F86\u0F8C\u0F90\u0F96\u0F97\u0F98\u0F99\u0FAE\u0FB1\u0FB8\u0FB9\u0FBA\u10A0\u10C6\u10D0\u10F7\u1100\u1101\u1102\u1104\u1105\u1108\u1109\u110A\u110B\u110D\u110E\u1113\u113C\u113D\u113E\u113F\u1140\u1141\u114C\u114D\u114E\u114F\u1150\u1151\u1154\u1156\u1159\u115A\u115F\u1162\u1163\u1164\u1165\u1166\u1167\u1168\u1169\u116A\u116D\u116F\u1172\u1174\u1175\u1176\u119E\u119F\u11A8\u11A9\u11AB\u11AC\u11AE\u11B0\u11B7\u11B9\u11BA\u11BB\u11BC\u11C3\u11EB\u11EC\u11F0\u11F1\u11F9\u11FA\u1E00\u1E9C\u1EA0\u1EFA\u1F00"
+"\u1F16\u1F18\u1F1E\u1F20\u1F46\u1F48\u1F4E\u1F50\u1F58\u1F59\u1F5A\u1F5B\u1F5C\u1F5D\u1F5E\u1F5F\u1F7E\u1F80\u1FB5\u1FB6\u1FBD\u1FBE\u1FBF\u1FC2\u1FC5\u1FC6\u1FCD\u1FD0\u1FD4\u1FD6\u1FDC\u1FE0\u1FED\u1FF2\u1FF5\u1FF6\u1FFD\u20D0\u20DD\u20E1\u20E2\u2126\u2127\u212A\u212C\u212E\u212F\u2180\u2183\u3005\u3006\u3007\u3008\u3021\u3030\u3031\u3036\u3041\u3095\u3099\u309B\u309D\u309F\u30A1\u30FB\u30FC\u30FF\u3105\u312D\u4E00\u9FA6\uAC00\uD7A4"},
- new[] {"_xmlD", "\u0030\u003A\u0660\u066A\u06F0\u06FA\u0966\u0970\u09E6\u09F0\u0A66\u0A70\u0AE6\u0AF0\u0B66\u0B70\u0BE7\u0BF0\u0C66\u0C70\u0CE6\u0CF0\u0D66\u0D70\u0E50\u0E5A\u0ED0\u0EDA\u0F20\u0F2A\u1040\u104A\u1369\u1372\u17E0\u17EA\u1810\u181A\uFF10\uFF1A"},
- new[] {"_xmlI", /* Start Name Char */ "\u003A\u003B\u0041\u005B\u005F\u0060\u0061\u007B\u00C0\u00D7\u00D8\u00F7\u00F8\u0132\u0134\u013F\u0141\u0149\u014A\u017F\u0180\u01C4\u01CD\u01F1\u01F4\u01F6\u01FA\u0218\u0250\u02A9\u02BB\u02C2\u0386\u0387\u0388\u038B\u038C\u038D\u038E\u03A2\u03A3\u03CF\u03D0\u03D7\u03DA\u03DB\u03DC\u03DD\u03DE\u03DF\u03E0\u03E1\u03E2\u03F4\u0401\u040D\u040E\u0450\u0451\u045D\u045E\u0482\u0490\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04EC\u04EE\u04F6\u04F8\u04FA\u0531\u0557\u0559\u055A\u0561\u0587\u05D0\u05EB\u05F0\u05F3\u0621\u063B\u0641\u064B\u0671\u06B8\u06BA\u06BF\u06C0\u06CF\u06D0\u06D4\u06D5\u06D6\u06E5\u06E7\u0905\u093A\u093D\u093E\u0958\u0962\u0985\u098D\u098F\u0991\u0993\u09A9\u09AA\u09B1\u09B2\u09B3\u09B6\u09BA\u09DC\u09DE\u09DF\u09E2\u09F0\u09F2\u0A05\u0A0B\u0A0F\u0A11\u0A13\u0A29\u0A2A\u0A31\u0A32\u0A34\u0A35\u0A37\u0A38\u0A3A\u0A59\u0A5D\u0A5E\u0A5F\u0A72\u0A75\u0A85\u0A8C\u0A8D\u0A8E\u0A8F\u0A92\u0A93\u0AA9\u0AAA\u0AB1\u0AB2\u0AB4\u0AB5\u0ABA\u0ABD\u0ABE\u0AE0\u0AE1\u0B05\u0B0D\u0B0F"
+ new[] {"_xmlD", "\u0030\u003A\u0660\u066A\u06F0\u06FA\u0966\u0970\u09E6\u09F0\u0A66\u0A70\u0AE6\u0AF0\u0B66\u0B70\u0BE7\u0BF0\u0C66\u0C70\u0CE6\u0CF0\u0D66\u0D70\u0E50\u0E5A\u0ED0\u0EDA\u0F20\u0F2A\u1040\u104A\u1369\u1372\u17E0\u17EA\u1810\u181A\uFF10\uFF1A"},
+ new[] {"_xmlI", /* Start Name Char */ "\u003A\u003B\u0041\u005B\u005F\u0060\u0061\u007B\u00C0\u00D7\u00D8\u00F7\u00F8\u0132\u0134\u013F\u0141\u0149\u014A\u017F\u0180\u01C4\u01CD\u01F1\u01F4\u01F6\u01FA\u0218\u0250\u02A9\u02BB\u02C2\u0386\u0387\u0388\u038B\u038C\u038D\u038E\u03A2\u03A3\u03CF\u03D0\u03D7\u03DA\u03DB\u03DC\u03DD\u03DE\u03DF\u03E0\u03E1\u03E2\u03F4\u0401\u040D\u040E\u0450\u0451\u045D\u045E\u0482\u0490\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04EC\u04EE\u04F6\u04F8\u04FA\u0531\u0557\u0559\u055A\u0561\u0587\u05D0\u05EB\u05F0\u05F3\u0621\u063B\u0641\u064B\u0671\u06B8\u06BA\u06BF\u06C0\u06CF\u06D0\u06D4\u06D5\u06D6\u06E5\u06E7\u0905\u093A\u093D\u093E\u0958\u0962\u0985\u098D\u098F\u0991\u0993\u09A9\u09AA\u09B1\u09B2\u09B3\u09B6\u09BA\u09DC\u09DE\u09DF\u09E2\u09F0\u09F2\u0A05\u0A0B\u0A0F\u0A11\u0A13\u0A29\u0A2A\u0A31\u0A32\u0A34\u0A35\u0A37\u0A38\u0A3A\u0A59\u0A5D\u0A5E\u0A5F\u0A72\u0A75\u0A85\u0A8C\u0A8D\u0A8E\u0A8F\u0A92\u0A93\u0AA9\u0AAA\u0AB1\u0AB2\u0AB4\u0AB5\u0ABA\u0ABD\u0ABE\u0AE0\u0AE1\u0B05\u0B0D\u0B0F"
+"\u0B11\u0B13\u0B29\u0B2A\u0B31\u0B32\u0B34\u0B36\u0B3A\u0B3D\u0B3E\u0B5C\u0B5E\u0B5F\u0B62\u0B85\u0B8B\u0B8E\u0B91\u0B92\u0B96\u0B99\u0B9B\u0B9C\u0B9D\u0B9E\u0BA0\u0BA3\u0BA5\u0BA8\u0BAB\u0BAE\u0BB6\u0BB7\u0BBA\u0C05\u0C0D\u0C0E\u0C11\u0C12\u0C29\u0C2A\u0C34\u0C35\u0C3A\u0C60\u0C62\u0C85\u0C8D\u0C8E\u0C91\u0C92\u0CA9\u0CAA\u0CB4\u0CB5\u0CBA\u0CDE\u0CDF\u0CE0\u0CE2\u0D05\u0D0D\u0D0E\u0D11\u0D12\u0D29\u0D2A\u0D3A\u0D60\u0D62\u0E01\u0E2F\u0E30\u0E31\u0E32\u0E34\u0E40\u0E46\u0E81\u0E83\u0E84\u0E85\u0E87\u0E89\u0E8A\u0E8B\u0E8D\u0E8E\u0E94\u0E98\u0E99\u0EA0\u0EA1\u0EA4\u0EA5\u0EA6\u0EA7\u0EA8\u0EAA\u0EAC\u0EAD\u0EAF\u0EB0\u0EB1\u0EB2\u0EB4\u0EBD\u0EBE\u0EC0\u0EC5\u0F40\u0F48\u0F49\u0F6A\u10A0\u10C6\u10D0\u10F7\u1100\u1101\u1102\u1104\u1105\u1108\u1109\u110A\u110B\u110D\u110E\u1113\u113C\u113D\u113E\u113F\u1140\u1141\u114C\u114D\u114E\u114F\u1150\u1151\u1154\u1156\u1159\u115A\u115F\u1162\u1163\u1164\u1165\u1166\u1167\u1168\u1169\u116A\u116D\u116F\u1172\u1174\u1175\u1176\u119E\u119F\u11A8\u11A9\u11AB\u11AC"
+"\u11AE\u11B0\u11B7\u11B9\u11BA\u11BB\u11BC\u11C3\u11EB\u11EC\u11F0\u11F1\u11F9\u11FA\u1E00\u1E9C\u1EA0\u1EFA\u1F00\u1F16\u1F18\u1F1E\u1F20\u1F46\u1F48\u1F4E\u1F50\u1F58\u1F59\u1F5A\u1F5B\u1F5C\u1F5D\u1F5E\u1F5F\u1F7E\u1F80\u1FB5\u1FB6\u1FBD\u1FBE\u1FBF\u1FC2\u1FC5\u1FC6\u1FCD\u1FD0\u1FD4\u1FD6\u1FDC\u1FE0\u1FED\u1FF2\u1FF5\u1FF6\u1FFD\u2126\u2127\u212A\u212C\u212E\u212F\u2180\u2183\u3007\u3008\u3021\u302A\u3041\u3095\u30A1\u30FB\u3105\u312D\u4E00\u9FA6\uAC00\uD7A4"},
- new[] {"_xmlW", "\u0024\u0025\u002B\u002C\u0030\u003A\u003C\u003F\u0041\u005B\u005E\u005F\u0060\u007B\u007C\u007D\u007E\u007F\u00A2\u00AB\u00AC\u00AD\u00AE\u00B7\u00B8\u00BB\u00BC\u00BF\u00C0\u0221\u0222\u0234\u0250\u02AE\u02B0\u02EF\u0300\u0350\u0360\u0370\u0374\u0376\u037A\u037B\u0384\u0387\u0388\u038B\u038C\u038D\u038E\u03A2\u03A3\u03CF\u03D0\u03F7\u0400\u0487\u0488\u04CF\u04D0\u04F6\u04F8\u04FA\u0500\u0510\u0531\u0557\u0559\u055A\u0561\u0588\u0591\u05A2\u05A3\u05BA\u05BB\u05BE\u05BF\u05C0\u05C1\u05C3\u05C4\u05C5\u05D0\u05EB\u05F0\u05F3\u0621\u063B\u0640\u0656\u0660\u066A\u066E\u06D4\u06D5\u06DD\u06DE\u06EE\u06F0\u06FF\u0710\u072D\u0730\u074B\u0780\u07B2\u0901\u0904\u0905\u093A\u093C\u094E\u0950\u0955\u0958\u0964\u0966\u0970\u0981\u0984\u0985\u098D\u098F\u0991\u0993\u09A9\u09AA\u09B1\u09B2\u09B3\u09B6\u09BA\u09BC\u09BD\u09BE\u09C5\u09C7\u09C9\u09CB\u09CE\u09D7\u09D8\u09DC\u09DE\u09DF\u09E4\u09E6\u09FB\u0A02\u0A03\u0A05\u0A0B\u0A0F\u0A11\u0A13\u0A29\u0A2A\u0A31\u0A32\u0A34\u0A35"
+ new[] {"_xmlW", "\u0024\u0025\u002B\u002C\u0030\u003A\u003C\u003F\u0041\u005B\u005E\u005F\u0060\u007B\u007C\u007D\u007E\u007F\u00A2\u00AB\u00AC\u00AD\u00AE\u00B7\u00B8\u00BB\u00BC\u00BF\u00C0\u0221\u0222\u0234\u0250\u02AE\u02B0\u02EF\u0300\u0350\u0360\u0370\u0374\u0376\u037A\u037B\u0384\u0387\u0388\u038B\u038C\u038D\u038E\u03A2\u03A3\u03CF\u03D0\u03F7\u0400\u0487\u0488\u04CF\u04D0\u04F6\u04F8\u04FA\u0500\u0510\u0531\u0557\u0559\u055A\u0561\u0588\u0591\u05A2\u05A3\u05BA\u05BB\u05BE\u05BF\u05C0\u05C1\u05C3\u05C4\u05C5\u05D0\u05EB\u05F0\u05F3\u0621\u063B\u0640\u0656\u0660\u066A\u066E\u06D4\u06D5\u06DD\u06DE\u06EE\u06F0\u06FF\u0710\u072D\u0730\u074B\u0780\u07B2\u0901\u0904\u0905\u093A\u093C\u094E\u0950\u0955\u0958\u0964\u0966\u0970\u0981\u0984\u0985\u098D\u098F\u0991\u0993\u09A9\u09AA\u09B1\u09B2\u09B3\u09B6\u09BA\u09BC\u09BD\u09BE\u09C5\u09C7\u09C9\u09CB\u09CE\u09D7\u09D8\u09DC\u09DE\u09DF\u09E4\u09E6\u09FB\u0A02\u0A03\u0A05\u0A0B\u0A0F\u0A11\u0A13\u0A29\u0A2A\u0A31\u0A32\u0A34\u0A35"
+"\u0A37\u0A38\u0A3A\u0A3C\u0A3D\u0A3E\u0A43\u0A47\u0A49\u0A4B\u0A4E\u0A59\u0A5D\u0A5E\u0A5F\u0A66\u0A75\u0A81\u0A84\u0A85\u0A8C\u0A8D\u0A8E\u0A8F\u0A92\u0A93\u0AA9\u0AAA\u0AB1\u0AB2\u0AB4\u0AB5\u0ABA\u0ABC\u0AC6\u0AC7\u0ACA\u0ACB\u0ACE\u0AD0\u0AD1\u0AE0\u0AE1\u0AE6\u0AF0\u0B01\u0B04\u0B05\u0B0D\u0B0F\u0B11\u0B13\u0B29\u0B2A\u0B31\u0B32\u0B34\u0B36\u0B3A\u0B3C\u0B44\u0B47\u0B49\u0B4B\u0B4E\u0B56\u0B58\u0B5C\u0B5E\u0B5F\u0B62\u0B66\u0B71\u0B82\u0B84\u0B85\u0B8B\u0B8E\u0B91\u0B92\u0B96\u0B99\u0B9B\u0B9C\u0B9D\u0B9E\u0BA0\u0BA3\u0BA5\u0BA8\u0BAB\u0BAE\u0BB6\u0BB7\u0BBA\u0BBE\u0BC3\u0BC6\u0BC9\u0BCA\u0BCE\u0BD7\u0BD8\u0BE7\u0BF3\u0C01\u0C04\u0C05\u0C0D\u0C0E\u0C11\u0C12\u0C29\u0C2A\u0C34\u0C35\u0C3A\u0C3E\u0C45\u0C46\u0C49\u0C4A\u0C4E\u0C55\u0C57\u0C60\u0C62\u0C66\u0C70\u0C82\u0C84\u0C85\u0C8D\u0C8E\u0C91\u0C92\u0CA9\u0CAA\u0CB4\u0CB5\u0CBA\u0CBE\u0CC5\u0CC6\u0CC9\u0CCA\u0CCE\u0CD5\u0CD7\u0CDE\u0CDF\u0CE0\u0CE2\u0CE6\u0CF0\u0D02\u0D04\u0D05\u0D0D\u0D0E\u0D11\u0D12\u0D29\u0D2A\u0D3A\u0D3E\u0D44\u0D46\u0D49"
+"\u0D4A\u0D4E\u0D57\u0D58\u0D60\u0D62\u0D66\u0D70\u0D82\u0D84\u0D85\u0D97\u0D9A\u0DB2\u0DB3\u0DBC\u0DBD\u0DBE\u0DC0\u0DC7\u0DCA\u0DCB\u0DCF\u0DD5\u0DD6\u0DD7\u0DD8\u0DE0\u0DF2\u0DF4\u0E01\u0E3B\u0E3F\u0E4F\u0E50\u0E5A\u0E81\u0E83\u0E84\u0E85\u0E87\u0E89\u0E8A\u0E8B\u0E8D\u0E8E\u0E94\u0E98\u0E99\u0EA0\u0EA1\u0EA4\u0EA5\u0EA6\u0EA7\u0EA8\u0EAA\u0EAC\u0EAD\u0EBA\u0EBB\u0EBE\u0EC0\u0EC5\u0EC6\u0EC7\u0EC8\u0ECE\u0ED0\u0EDA\u0EDC\u0EDE\u0F00\u0F04\u0F13\u0F3A\u0F3E\u0F48\u0F49\u0F6B\u0F71\u0F85\u0F86\u0F8C\u0F90\u0F98\u0F99\u0FBD\u0FBE\u0FCD\u0FCF\u0FD0\u1000\u1022\u1023\u1028\u1029\u102B\u102C\u1033\u1036\u103A\u1040\u104A\u1050\u105A\u10A0\u10C6\u10D0\u10F9\u1100\u115A\u115F\u11A3\u11A8\u11FA\u1200\u1207\u1208\u1247\u1248\u1249\u124A\u124E\u1250\u1257\u1258\u1259\u125A\u125E\u1260\u1287\u1288\u1289\u128A\u128E\u1290\u12AF\u12B0\u12B1\u12B2\u12B6\u12B8\u12BF\u12C0\u12C1\u12C2\u12C6\u12C8\u12CF\u12D0\u12D7\u12D8\u12EF\u12F0\u130F\u1310\u1311\u1312\u1316\u1318\u131F\u1320\u1347\u1348\u135B\u1369\u137D\u13A0"
+"\u13F5\u1401\u166D\u166F\u1677\u1681\u169B\u16A0\u16EB\u16EE\u16F1\u1700\u170D\u170E\u1715\u1720\u1735\u1740\u1754\u1760\u176D\u176E\u1771\u1772\u1774\u1780\u17D4\u17D7\u17D8\u17DB\u17DD\u17E0\u17EA\u180B\u180E\u1810\u181A\u1820\u1878\u1880\u18AA\u1E00\u1E9C\u1EA0\u1EFA\u1F00\u1F16\u1F18\u1F1E\u1F20\u1F46\u1F48\u1F4E\u1F50\u1F58\u1F59\u1F5A\u1F5B\u1F5C\u1F5D\u1F5E\u1F5F\u1F7E\u1F80\u1FB5\u1FB6\u1FC5\u1FC6\u1FD4\u1FD6\u1FDC\u1FDD\u1FF0\u1FF2\u1FF5\u1FF6\u1FFF\u2044\u2045\u2052\u2053\u2070\u2072\u2074\u207D\u207F\u208D\u20A0\u20B2\u20D0\u20EB\u2100\u213B\u213D\u214C\u2153\u2184\u2190\u2329\u232B\u23B4\u23B7\u23CF\u2400\u2427\u2440\u244B\u2460\u24FF\u2500\u2614\u2616\u2618\u2619\u267E\u2680\u268A\u2701\u2705\u2706\u270A\u270C\u2728\u2729\u274C\u274D\u274E\u274F\u2753\u2756\u2757\u2758\u275F\u2761\u2768\u2776\u2795\u2798\u27B0\u27B1\u27BF\u27D0\u27E6\u27F0\u2983\u2999\u29D8\u29DC\u29FC\u29FE\u2B00\u2E80\u2E9A\u2E9B\u2EF4\u2F00\u2FD6\u2FF0\u2FFC\u3004\u3008\u3012\u3014\u3020\u3030\u3031\u303D\u303E\u3040"
* For categorizing ASCII characters.
*/
private static readonly byte[] s_category = new byte[] {
- // 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5 6 7 8 9 A B C D E F
- 0,0,0,0,0,0,0,0,0,X,X,0,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- // ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
- X,0,0,Z,S,0,0,0,S,S,Q,Q,0,0,S,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Q,
- // @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,S,S,0,S,0,
- // ' a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Q,S,0,0,0};
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, X, X, 0, X, X, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ // ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
+ X, 0, 0, Z, S, 0, 0, 0, S, S, Q, Q, 0, 0, S, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Q,
+ // @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, S, S, 0, S, 0,
+ // ' a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Q, S, 0, 0, 0};
/*
* Returns true for those characters that terminate a string of ordinary chars.
// Shortcuts just to keep the code cleaner
QueuedMap<ISourceBlock<T>, DataflowMessageHeader> postponed = _nonGreedyState.PostponedMessages;
KeyValuePair<ISourceBlock<T>, DataflowMessageHeader>[] postponedTemp = _nonGreedyState.PostponedMessagesTemp;
- List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader,T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
+ List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
// Clear the temporary buffer. This is safe to do without a lock because
// it is only accessed by the serial message loop.