本文整理汇总了C#中TokenTypes类的典型用法代码示例。如果您正苦于以下问题:C# TokenTypes类的具体用法?C# TokenTypes怎么用?C# TokenTypes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TokenTypes类属于命名空间,在下文中一共展示了TokenTypes类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CilRuntimeType
/// <summary>
/// Initializes a new instance of the <see cref="CilRuntimeType"/> class.
/// </summary>
/// <param name="moduleTypeSystem">The module type system.</param>
/// <param name="token">The token.</param>
/// <param name="typeDefRow">The type def row.</param>
/// <param name="maxField">The max field.</param>
/// <param name="maxMethod">The max method.</param>
/// <param name="packing">The packing.</param>
/// <param name="size">The size.</param>
public CilRuntimeType(IModuleTypeSystem moduleTypeSystem, TokenTypes token, TypeDefRow typeDefRow, TokenTypes maxField, TokenTypes maxMethod, int packing, int size)
: base(moduleTypeSystem, (int)token)
{
this.baseTypeToken = typeDefRow.Extends;
this.nameIdx = typeDefRow.TypeNameIdx;
this.namespaceIdx = typeDefRow.TypeNamespaceIdx;
base.Attributes = typeDefRow.Flags;
base.Pack = packing;
base.Size = size;
// Load all fields of the type
int members = maxField - typeDefRow.FieldList;
if (0 < members)
{
int i = (int)(typeDefRow.FieldList & TokenTypes.RowIndexMask) - 1;
base.Fields = new ReadOnlyRuntimeFieldListView((IModuleTypeSystemInternalList)moduleTypeSystem, i, members);
}
else
{
base.Fields = ReadOnlyRuntimeFieldListView.Empty;
}
// Load all methods of the type
members = maxMethod - typeDefRow.MethodList;
if (0 < members)
{
int i = (int)(typeDefRow.MethodList & TokenTypes.RowIndexMask) - 1;
base.Methods = new ReadOnlyRuntimeMethodListView((IModuleTypeSystemInternalList)moduleTypeSystem, i, members);
}
else
{
base.Methods = ReadOnlyRuntimeMethodListView.Empty;
}
}
开发者ID:illuminus86,项目名称:MOSA-Project,代码行数:45,代码来源:CilRuntimeType.cs
示例2: Parameter
public Parameter(TokenTypes tokType, object column, object value)
{
this.TokType = tokType;
this.ParType = ParameterType.Initial;
this.Column = column.ToString();
this.Value = value;
}
开发者ID:TaylorLi,项目名称:gettogether,代码行数:7,代码来源:Parameter.cs
示例3: Roundtrip_BugWithPath
public void Roundtrip_BugWithPath(TokenTypes types)
{
var parameters = new Dictionary<string, string>
{
{ "template", "thumbnailUrl" },
{ "url", "C:\\Work\\Samsung\\InMotion\\InMotion.Frontend\\media\\1594\\jazz-initiative.jpg" },
};
List<string> keysAndValues = new List<string>(parameters.Count * 2);
foreach (var keyValuePair in parameters)
{
keysAndValues.Add(keyValuePair.Key);
keysAndValues.Add(keyValuePair.Value);
}
SecureTokenBuilder tokenBuilder = new SecureTokenBuilder("2z!6Wd0vghEQtkalNS9a", types);
string token = tokenBuilder.EncodeObject(keysAndValues.ToArray());
string[] values = (string[])tokenBuilder.DecodeObject(token);
for(int i = 0; i < keysAndValues.Count; ++i)
{
Assert.AreEqual(keysAndValues[i], values[i]);
}
}
开发者ID:jeremysimmons,项目名称:sixpack-library,代码行数:25,代码来源:SecureTokenBuilderTests.cs
示例4: GenericParamRow
/// <summary>
/// Initializes a new instance of the <see cref="GenericParamRow"/> struct.
/// </summary>
/// <param name="number">The number.</param>
/// <param name="flags">The flags.</param>
/// <param name="ownerTableIdx">The owner table idx.</param>
/// <param name="nameStringIdx">The name string idx.</param>
public GenericParamRow(ushort number, GenericParamAttributes flags, TokenTypes ownerTableIdx, TokenTypes nameStringIdx)
{
_number = number;
_flags = flags;
_ownerTableIdx = ownerTableIdx;
_nameStringIdx = nameStringIdx;
}
开发者ID:illuminus86,项目名称:MOSA-Project,代码行数:14,代码来源:GenericParamRow.cs
示例5: WriteHasCustomAttributeIndex
/// <summary>
/// Writes a coded index value in a metadata table.
/// </summary>
/// <param name="token">The indexed token.</param>
public void WriteHasCustomAttributeIndex(TokenTypes token)
{
WriteIndex(token, new[]
{
TokenTypes.MethodDef,
TokenTypes.Field,
TokenTypes.TypeRef,
TokenTypes.TypeDef,
TokenTypes.Param,
TokenTypes.InterfaceImpl,
TokenTypes.MemberRef,
TokenTypes.Module,
TokenTypes.DeclSecurity,
TokenTypes.Property,
TokenTypes.Event,
TokenTypes.StandAloneSig,
TokenTypes.ModuleRef,
TokenTypes.TypeSpec,
TokenTypes.Assembly,
TokenTypes.AssemblyRef,
TokenTypes.File,
TokenTypes.ExportedType,
TokenTypes.ManifestResource
});
}
开发者ID:hj1980,项目名称:Mosa,代码行数:29,代码来源:MetadataTableCodedIndexWriter.cs
示例6: GetConditionsByObject
///<summary>
///Get conditions by object with Multi-TokenType.
///</summary>
public static ParameterCollection GetConditionsByObject(DO_Title.UO_Title parameterObj, bool isAnd, TokenTypes tokenTypes, Dictionary<DO_Title.Columns, TokenTypes> extTokens)
{
ParameterCollection objectConditions = new ParameterCollection();
TokenTypes tt = tokenTypes;
ParameterType pt = isAnd ? ParameterType.And : ParameterType.Or;
if (!string.IsNullOrEmpty(parameterObj.BigDateCode))
{
objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_Title.Columns.BigDateCode, extTokens), DO_Title.Columns.BigDateCode, parameterObj.BigDateCode);
}
if (!string.IsNullOrEmpty(parameterObj.TitleCode))
{
objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_Title.Columns.TitleCode, extTokens), DO_Title.Columns.TitleCode, parameterObj.TitleCode);
}
if (!string.IsNullOrEmpty(parameterObj.TitleName))
{
objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_Title.Columns.TitleName, extTokens), DO_Title.Columns.TitleName, parameterObj.TitleName);
}
if (parameterObj.CreateOn != DateTime.MinValue)
{
objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_Title.Columns.CreateOn, extTokens), DO_Title.Columns.CreateOn, parameterObj.CreateOn);
}
if (!string.IsNullOrEmpty(parameterObj.CreateBy))
{
objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_Title.Columns.CreateBy, extTokens), DO_Title.Columns.CreateBy, parameterObj.CreateBy);
}
if (parameterObj.UpdateOn != DateTime.MinValue)
{
objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_Title.Columns.UpdateOn, extTokens), DO_Title.Columns.UpdateOn, parameterObj.UpdateOn);
}
if (!string.IsNullOrEmpty(parameterObj.UpdateBy))
{
objectConditions.AddCondition(pt, GetColumnTokenType(tt, DO_Title.Columns.UpdateBy, extTokens), DO_Title.Columns.UpdateBy, parameterObj.UpdateBy);
}
return objectConditions;
}
开发者ID:eagledu,项目名称:wedding,代码行数:38,代码来源:BO_Title.cs
示例7: AssemblyRefOSRow
/// <summary>
/// Initializes a new instance of the <see cref="AssemblyRefOSRow"/> struct.
/// </summary>
/// <param name="platformId">The platform id.</param>
/// <param name="majorVersion">The major version.</param>
/// <param name="minorVersion">The minor version.</param>
/// <param name="assemblyRefIdx">The assembly ref idx.</param>
public AssemblyRefOSRow(uint platformId, uint majorVersion, uint minorVersion, TokenTypes assemblyRefIdx)
{
_platformId = platformId;
_majorVersion = majorVersion;
_minorVersion = minorVersion;
_assemblyRefIdx = assemblyRefIdx;
}
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:14,代码来源:AssemblyRefOSRow.cs
示例8: MethodSemanticsRow
/// <summary>
/// Initializes a new instance of the <see cref="MethodSemanticsRow"/> struct.
/// </summary>
/// <param name="semantics">The semantics.</param>
/// <param name="methodTableIdx">The method table idx.</param>
/// <param name="associationTableIdx">The association table idx.</param>
public MethodSemanticsRow(MethodSemanticsAttributes semantics, TokenTypes methodTableIdx,
TokenTypes associationTableIdx)
{
_semantics = semantics;
_methodTableIdx = methodTableIdx;
_associationTableIdx = associationTableIdx;
}
开发者ID:illuminus86,项目名称:MOSA-Project,代码行数:13,代码来源:MethodSemanticsRow.cs
示例9: SqlToken
public SqlToken(TokenTypes type, int oneBasedLineNumber, int oneBasedStartCharacterIndex)
{
StartCharacterIndex = oneBasedStartCharacterIndex;
LineNumber = oneBasedLineNumber;
TokenType = type;
IsOpen = false;
}
开发者ID:nycdotnet,项目名称:TSqlFlex.SqlParser,代码行数:7,代码来源:SqlToken.cs
示例10: ManifestResourceRow
/// <summary>
/// Initializes a new instance of the <see cref="ManifestResourceRow"/> struct.
/// </summary>
/// <param name="offset">The offset.</param>
/// <param name="flags">The flags.</param>
/// <param name="nameStringIndex">Index of the name string.</param>
/// <param name="implementationTableIdx">The implementation table idx.</param>
public ManifestResourceRow(uint offset, ManifestResourceAttributes flags, TokenTypes nameStringIndex,
TokenTypes implementationTableIdx)
{
_offset = offset;
_flags = flags;
_nameStringIdx = nameStringIndex;
_implementationTableIdx = implementationTableIdx;
}
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:15,代码来源:ManifestResourceRow.cs
示例11: Roundtrip
public void Roundtrip(string text, TokenTypes types)
{
SecureTokenBuilder builder = new SecureTokenBuilder("[email protected]", types);
string token = builder.EncodeToken(text);
string decoded = builder.DecodeToken(token);
Assert.AreEqual(text, decoded);
}
开发者ID:jeremysimmons,项目名称:sixpack-library,代码行数:8,代码来源:SecureTokenBuilderTests.cs
示例12: ImplMapRow
/// <summary>
/// Initializes a new instance of the <see cref="ImplMapRow"/> struct.
/// </summary>
/// <param name="mappingFlags">The mapping flags.</param>
/// <param name="memberForwardedTableIdx">The member forwarded table idx.</param>
/// <param name="importNameStringIdx">The import name string idx.</param>
/// <param name="importScopeTableIdx">The import scope table idx.</param>
public ImplMapRow(PInvokeAttributes mappingFlags, TokenTypes memberForwardedTableIdx,
TokenTypes importNameStringIdx, TokenTypes importScopeTableIdx)
{
_mappingFlags = mappingFlags;
_memberForwardedTableIdx = memberForwardedTableIdx;
_importNameStringIdx = importNameStringIdx;
_importScopeTableIdx = importScopeTableIdx;
}
开发者ID:illuminus86,项目名称:MOSA-Project,代码行数:15,代码来源:ImplMapRow.cs
示例13: LoadSignature
/// <summary>
/// Loads the signature.
/// </summary>
/// <param name="provider">The provider.</param>
/// <param name="token">The token.</param>
public void LoadSignature(IMetadataProvider provider, TokenTypes token)
{
byte[] buffer;
int index = 0;
provider.Read(token, out buffer);
ParseSignature(buffer, ref index);
Debug.Assert(index == buffer.Length, @"Signature parser didn't complete.");
}
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:13,代码来源:Signature.cs
示例14: WriteHasConstantIndex
/// <summary>
/// Writes a coded index value in a metadata table.
/// </summary>
/// <param name="token">The indexed token.</param>
public void WriteHasConstantIndex(TokenTypes token)
{
WriteIndex(token, new[]
{
TokenTypes.Field,
TokenTypes.Param,
TokenTypes.Property
});
}
开发者ID:hj1980,项目名称:Mosa,代码行数:13,代码来源:MetadataTableCodedIndexWriter.cs
示例15: Token
/// <summary>
/// Initializes a new instance of the Token class.
/// </summary>
internal Token(string value, int startLine, int startCol, int endLine, int endCol, TokenTypes type)
{
Value = value;
StartLine = startLine;
EndLine = endLine;
StartCol = startCol;
EndCol = endCol;
Type = type;
}
开发者ID:mnisl,项目名称:OD,代码行数:12,代码来源:Token.cs
示例16: Signature
/// <summary>
/// Loads the signature.
/// </summary>
/// <param name="provider">The provider.</param>
/// <param name="token">The token.</param>
public Signature(IMetadataProvider provider, TokenTypes token)
{
SignatureReader reader = new SignatureReader(provider.ReadBlob(token));
this.ParseSignature(reader);
Debug.Assert(reader.Index == reader.Length, @"Signature parser didn't complete.");
this.token = token;
}
开发者ID:illuminus86,项目名称:MOSA-Project,代码行数:14,代码来源:Signature.cs
示例17: ExportedTypeRow
/// <summary>
/// Initializes a new instance of the <see cref="ExportedTypeRow"/> struct.
/// </summary>
/// <param name="flags">The flags.</param>
/// <param name="typeDefTableIdx">The type def table idx.</param>
/// <param name="typeNameStringIdx">The type name string idx.</param>
/// <param name="typeNamespaceStringIdx">The type namespace string idx.</param>
/// <param name="implementationTableIdx">The implementation table idx.</param>
public ExportedTypeRow(TypeAttributes flags, TokenTypes typeDefTableIdx, TokenTypes typeNameStringIdx,
TokenTypes typeNamespaceStringIdx, TokenTypes implementationTableIdx)
{
_flags = flags;
_typeDefTableIdx = typeDefTableIdx;
_typeNameStringIdx = typeNameStringIdx;
_typeNamespaceStringIdx = typeNamespaceStringIdx;
_implementationTableIdx = implementationTableIdx;
}
开发者ID:illuminus86,项目名称:MOSA-Project,代码行数:17,代码来源:ExportedTypeRow.cs
示例18: TypeDefRow
/// <summary>
/// Initializes a new instance of the <see cref="TypeDefRow"/> struct.
/// </summary>
/// <param name="flags">The flags.</param>
/// <param name="typeNameIdx">The type name idx.</param>
/// <param name="typeNamespaceIdx">The type namespace idx.</param>
/// <param name="extends">The extends.</param>
/// <param name="fieldList">The field list.</param>
/// <param name="methodList">The method list.</param>
public TypeDefRow(TypeAttributes flags, TokenTypes typeNameIdx, TokenTypes typeNamespaceIdx,
TokenTypes extends, TokenTypes fieldList, TokenTypes methodList)
{
_flags = flags;
_typeNameIdx = typeNameIdx;
_typeNamespaceIdx = typeNamespaceIdx;
_extends = extends;
_fieldList = fieldList;
_methodList = methodList;
}
开发者ID:rtownsend,项目名称:MOSA-Project,代码行数:19,代码来源:TypeDefRow.cs
示例19: Parse
/// <summary>
/// Parses the specified provider.
/// </summary>
/// <param name="provider">The provider.</param>
/// <param name="token">The token.</param>
/// <returns></returns>
public static LocalVariableSignature Parse(IMetadataProvider provider, TokenTypes token)
{
byte[] buffer;
int index = 0;
provider.Read(token, out buffer);
LocalVariableSignature sig = new LocalVariableSignature();
sig.ParseSignature(buffer, ref index);
Debug.Assert(index == buffer.Length, @"Signature parser didn't complete.");
return sig;
}
开发者ID:hj1980,项目名称:Mosa,代码行数:16,代码来源:LocalVariableSignature.cs
示例20: MethodDefRow
/// <summary>
/// Initializes a new instance of the <see cref="MethodDefRow"/> struct.
/// </summary>
/// <param name="rva">The rva.</param>
/// <param name="implFlags">The impl flags.</param>
/// <param name="flags">The flags.</param>
/// <param name="nameStringIdx">The name string idx.</param>
/// <param name="signatureBlobIdx">The signature BLOB idx.</param>
/// <param name="paramList">The param list.</param>
public MethodDefRow(uint rva, MethodImplAttributes implFlags, MethodAttributes flags, TokenTypes nameStringIdx,
TokenTypes signatureBlobIdx, TokenTypes paramList)
{
_rva = rva;
_implFlags = implFlags;
_flags = flags;
_nameStringIdx = nameStringIdx;
_signatureBlobIdx = signatureBlobIdx;
_paramList = paramList;
}
开发者ID:hj1980,项目名称:Mosa,代码行数:19,代码来源:MethodDefRow.cs
注:本文中的TokenTypes类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论