Ejemplo n.º 1
0
		internal static string Escape(string identifier)
		{
			if (ILHelpers.IsValidIdentifier(identifier) && !ILHelpers.ilKeywords.Contains(identifier))
			{
				return identifier;
			}
			return String.Concat("'", BaseLanguageWriter.ConvertString(identifier).Replace("'", "\\'"), "'");
		}
Ejemplo n.º 2
0
 internal static string Escape(string identifier)
 {
     if (IsValidIdentifier(identifier) && !ilKeywords.Contains(identifier))
     {
         return(identifier);
     }
     else
     {
         return("'" + BaseLanguageWriter.ConvertString(identifier).Replace("'", "\\'") + "'");
     }
 }
Ejemplo n.º 3
0
 internal FlagsWriter(BaseLanguageWriter languageWriter)
 {
     this.languageWriter = languageWriter;
 }
Ejemplo n.º 4
0
 internal FlagsWriter(BaseLanguageWriter languageWriter)
 {
     stackVariable1 = new FlagsWriter.EnumNameCollection <MethodAttributes>();
     stackVariable1.Add(32, "final");
     stackVariable1.Add(128, "hidebysig");
     stackVariable1.Add(0x800, "specialname");
     stackVariable1.Add(0x2000, null);
     stackVariable1.Add(8, "export");
     stackVariable1.Add(0x1000, "rtspecialname");
     stackVariable1.Add(0x8000, "reqsecobj");
     stackVariable1.Add(0x100, "newslot");
     stackVariable1.Add(0x200, "strict");
     stackVariable1.Add(0x400, "abstract");
     stackVariable1.Add(64, "virtual");
     stackVariable1.Add(16, "static");
     stackVariable1.Add(0x4000, null);
     this.methodAttributeFlags = stackVariable1;
     stackVariable29           = new FlagsWriter.EnumNameCollection <MethodAttributes>();
     stackVariable29.Add(1, "private");
     stackVariable29.Add(2, "famandassem");
     stackVariable29.Add(3, "assembly");
     stackVariable29.Add(4, "family");
     stackVariable29.Add(5, "famorassem");
     stackVariable29.Add(6, "public");
     this.methodVisibility = stackVariable29;
     stackVariable43       = new FlagsWriter.EnumNameCollection <MethodCallingConvention>();
     stackVariable43.Add(1, "unmanaged cdecl");
     stackVariable43.Add(2, "unmanaged stdcall");
     stackVariable43.Add(3, "unmanaged thiscall");
     stackVariable43.Add(4, "unmanaged fastcall");
     stackVariable43.Add(5, "vararg");
     stackVariable43.Add(16, null);
     this.callingConvention = stackVariable43;
     stackVariable57        = new FlagsWriter.EnumNameCollection <MethodImplAttributes>();
     stackVariable57.Add(0, "cil");
     stackVariable57.Add(1, "native");
     stackVariable57.Add(2, "optil");
     stackVariable57.Add(3, "runtime");
     this.methodCodeType = stackVariable57;
     stackVariable67     = new FlagsWriter.EnumNameCollection <MethodImplAttributes>();
     stackVariable67.Add(32, "synchronized");
     stackVariable67.Add(8, "noinlining");
     stackVariable67.Add(64, "nooptimization");
     stackVariable67.Add(128, "preservesig");
     stackVariable67.Add(0x1000, "internalcall");
     stackVariable67.Add(16, "forwardref");
     stackVariable67.Add(0x100, "aggressiveinlining");
     this.methodImpl = stackVariable67;
     stackVariable83 = new FlagsWriter.EnumNameCollection <FieldAttributes>();
     stackVariable83.Add(1, "private");
     stackVariable83.Add(2, "famandassem");
     stackVariable83.Add(3, "assembly");
     stackVariable83.Add(4, "family");
     stackVariable83.Add(5, "famorassem");
     stackVariable83.Add(6, "public");
     this.fieldVisibility = stackVariable83;
     stackVariable97      = new FlagsWriter.EnumNameCollection <FieldAttributes>();
     stackVariable97.Add(16, "static");
     stackVariable97.Add(64, "literal");
     stackVariable97.Add(32, "initonly");
     stackVariable97.Add(0x200, "specialname");
     stackVariable97.Add(0x400, "rtspecialname");
     stackVariable97.Add(128, "notserialized");
     this.fieldAttributes = stackVariable97;
     stackVariable111     = new FlagsWriter.EnumNameCollection <PropertyAttributes>();
     stackVariable111.Add(0x200, "specialname");
     stackVariable111.Add(0x400, "rtspecialname");
     stackVariable111.Add(0x1000, "hasdefault");
     this.propertyAttributes = stackVariable111;
     stackVariable119        = new FlagsWriter.EnumNameCollection <EventAttributes>();
     stackVariable119.Add(0x200, "specialname");
     stackVariable119.Add(0x400, "rtspecialname");
     this.eventAttributes = stackVariable119;
     stackVariable125     = new FlagsWriter.EnumNameCollection <TypeAttributes>();
     stackVariable125.Add(1, "public");
     stackVariable125.Add(0, "private");
     stackVariable125.Add(2, "nested public");
     stackVariable125.Add(3, "nested private");
     stackVariable125.Add(5, "nested assembly");
     stackVariable125.Add(4, "nested family");
     stackVariable125.Add(6, "nested famandassem");
     stackVariable125.Add(7, "nested famorassem");
     this.typeVisibility = stackVariable125;
     stackVariable143    = new FlagsWriter.EnumNameCollection <TypeAttributes>();
     stackVariable143.Add(0, "auto");
     stackVariable143.Add(8, "sequential");
     stackVariable143.Add(16, "explicit");
     this.typeLayout  = stackVariable143;
     stackVariable151 = new FlagsWriter.EnumNameCollection <TypeAttributes>();
     stackVariable151.Add(0x20000, "auto");
     stackVariable151.Add(0, "ansi");
     stackVariable151.Add(0x10000, "unicode");
     this.typeStringFormat = stackVariable151;
     stackVariable159      = new FlagsWriter.EnumNameCollection <TypeAttributes>();
     stackVariable159.Add(128, "abstract");
     stackVariable159.Add(0x100, "sealed");
     stackVariable159.Add(0x400, "specialname");
     stackVariable159.Add(0x1000, "import");
     stackVariable159.Add(0x2000, "serializable");
     stackVariable159.Add(0x100000, "beforefieldinit");
     stackVariable159.Add(0x40000, null);
     this.typeAttributes = stackVariable159;
     base();
     this.languageWriter = languageWriter;
     return;
 }