ilcclib.Converter.CIL.CILConverter.GetStringPointerField C# (CSharp) Method

GetStringPointerField() private method

private GetStringPointerField ( string String ) : FieldInfo
String string
return System.Reflection.FieldInfo
        private FieldInfo GetStringPointerField(string String)
        {
            if (!StringCache.ContainsKey(String))
            {
                var FieldBuilder = CurrentClass.DefineField("$$__string_literal_" + (UniqueId++), typeof(sbyte*), FieldAttributes.Static | FieldAttributes.Public | FieldAttributes.InitOnly | FieldAttributes.HasDefault);

                this.StaticInitializerSafeILGenerator.Push(String);
                this.StaticInitializerSafeILGenerator.Call((CLibUtils.StringToPointerDelegate)CLibUtils.GetLiteralStringPointer);
                this.StaticInitializerSafeILGenerator.StoreField(FieldBuilder);
                StringCache[String] = FieldBuilder;
            }

            return StringCache[String];
        }