本文整理汇总了C#中BuiltinType类的典型用法代码示例。如果您正苦于以下问题:C# BuiltinType类的具体用法?C# BuiltinType怎么用?C# BuiltinType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BuiltinType类属于命名空间,在下文中一共展示了BuiltinType类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: __CreateInstance
public static BuiltinType __CreateInstance(BuiltinType.Internal native)
{
return new BuiltinType(native);
}
开发者ID:RainsSoft,项目名称:CppSharp,代码行数:4,代码来源:AST.cs
示例2: __CopyValue
private static BuiltinType.Internal* __CopyValue(BuiltinType.Internal native)
{
var ret = Marshal.AllocHGlobal(12);
CppSharp.Parser.AST.BuiltinType.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return (BuiltinType.Internal*) ret;
}
开发者ID:RainsSoft,项目名称:CppSharp,代码行数:6,代码来源:AST.cs
示例3: BuiltinType
private BuiltinType(BuiltinType.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
开发者ID:CSRedRat,项目名称:CppSharp,代码行数:6,代码来源:AST.cs
示例4: __CopyValue
private static void* __CopyValue(BuiltinType.__Internal native)
{
var ret = Marshal.AllocHGlobal(12);
global::CppSharp.Parser.AST.BuiltinType.__Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
开发者ID:ddobrev,项目名称:CppSharp,代码行数:6,代码来源:CppSharp.CppParser.cs
示例5: __CreateInstance
public static BuiltinType __CreateInstance(BuiltinType.Internal native, bool skipVTables = false)
{
return new BuiltinType(native, skipVTables);
}
开发者ID:CSRedRat,项目名称:CppSharp,代码行数:4,代码来源:AST.cs
示例6: BuiltinType
internal BuiltinType(BuiltinType.Internal* native)
: this(new global::System.IntPtr(native))
{
}
开发者ID:kidleon,项目名称:CppSharp,代码行数:4,代码来源:AST.cs
示例7: AddBuiltInType
private void AddBuiltInType(object o, CorDebugAssembly assm, string type)
{
uint tkCLR = MetaData.Helper.ClassTokenFromName(assm.MetaDataImport, type);
CorDebugClass c = assm.GetClassFromTokenCLR(tkCLR);
BuiltinType builtInType = new BuiltinType( assm, tkCLR, c );
m_tdBuiltin[o] = builtInType;
}
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:9,代码来源:CorDebugProcess.cs
示例8: BuiltinType
internal BuiltinType(BuiltinType.Internal native)
: this(__CopyValue(native))
{
}
开发者ID:vovkasm,项目名称:CppSharp,代码行数:4,代码来源:AST.cs
示例9: BuiltinType
private BuiltinType(BuiltinType.Internal native)
: this(__CopyValue(native))
{
__ownsNativeInstance = true;
}
开发者ID:KonajuGames,项目名称:CppSharp,代码行数:5,代码来源:AST.cs
示例10: MarshalStringToManaged
private string MarshalStringToManaged(string varName, BuiltinType type)
{
var isChar = type.Type == PrimitiveType.Char;
var encoding = isChar ? Encoding.ASCII : Encoding.Unicode;
if (Equals(encoding, Encoding.ASCII))
encoding = Context.Driver.Options.Encoding;
if (Equals(encoding, Encoding.ASCII))
return string.Format("Marshal.PtrToStringAnsi({0})", varName);
// If we reach this, we know the string is Unicode.
if (type.Type == PrimitiveType.Char ||
Context.Driver.TargetInfo.WCharWidth == 16)
return string.Format("Marshal.PtrToStringUni({0})", varName);
// If we reach this, we should have an UTF-32 wide string.
const string encodingName = "System.Text.Encoding.UTF32";
return string.Format(
"CppSharp.Runtime.Helpers.MarshalEncodedString({0}, {1})",
varName, encodingName);
throw new NotSupportedException(string.Format("{0} is not supported yet.",
Context.Driver.Options.Encoding.EncodingName));
}
开发者ID:fangsunjian,项目名称:CppSharp,代码行数:25,代码来源:CSharpMarshal.cs
示例11: VisitBuiltinType
public override bool VisitBuiltinType(BuiltinType builtin, TypeQualifiers quals)
{
return VisitPrimitiveType(builtin.Type);
}
开发者ID:corefan,项目名称:CppSharp,代码行数:4,代码来源:CLIMarshal.cs
示例12: MarshalStringToManaged
private string MarshalStringToManaged(string varName, BuiltinType type)
{
var encoding = type.Type == PrimitiveType.Char ?
Encoding.ASCII : Encoding.Unicode;
if (Equals(encoding, Encoding.ASCII))
encoding = Context.Driver.Options.Encoding;
if (Equals(encoding, Encoding.ASCII))
return string.Format("clix::marshalString<clix::E_UTF8>({0})", varName);
if (Equals(encoding, Encoding.Unicode) ||
Equals(encoding, Encoding.BigEndianUnicode))
return string.Format("clix::marshalString<clix::E_UTF16>({0})", varName);
throw new NotSupportedException(string.Format("{0} is not supported yet.",
Context.Driver.Options.Encoding.EncodingName));
}
开发者ID:corefan,项目名称:CppSharp,代码行数:18,代码来源:CLIMarshal.cs
示例13: BuiltinType
private BuiltinType(BuiltinType.Internal native)
: this(__CopyValue(native))
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
开发者ID:RainsSoft,项目名称:CppSharp,代码行数:6,代码来源:AST.cs
示例14: AddBuiltInType
private void AddBuiltInType (object o, CorDebugAssembly assm, string type)
{
uint tkCLR = assm.MetaData.Types.First (t => t.FullName == type).MetadataToken.ToUInt32 ();
CorDebugClass c = assm.GetClassFromTokenCLR (tkCLR);
BuiltinType builtInType = new BuiltinType (assm, tkCLR, c);
m_tdBuiltin [o] = builtInType;
}
开发者ID:Roddoric,项目名称:Monkey.Robotics,代码行数:9,代码来源:CorDebugProcess.cs
注:本文中的BuiltinType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论