示例#1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="tableName">Name of table</param>
 /// <param name="token">Token</param>
 /// <param name="span">Span</param>
 /// <param name="fields">Fields</param>
 /// <param name="tablesHeap">Owner heap</param>
 public TableRecordData(string tableName, MDToken token, HexBufferSpan span, BufferField[] fields, TablesHeap tablesHeap)
     : base(tableName, span)
 {
     if (fields == null)
     {
         throw new ArgumentNullException(nameof(fields));
     }
     if (fields.Length == 0)
     {
         throw new ArgumentOutOfRangeException(nameof(fields));
     }
     if (tablesHeap == null)
     {
         throw new ArgumentNullException(nameof(tablesHeap));
     }
     Token      = token;
     Fields     = fields;
     TablesHeap = tablesHeap;
 }
示例#2
0
 /// <summary>
 /// Encodes a token
 /// </summary>
 /// <param name="token">The token</param>
 /// <param name="codedToken">Coded token</param>
 /// <returns><c>true</c> if successful</returns>
 public bool Encode(MDToken token, out uint codedToken)
 {
     return(Encode(token.Raw, out codedToken));
 }
示例#3
0
 /// <summary>
 /// Encodes a token
 /// </summary>
 /// <param name="token">The token</param>
 /// <returns>Coded token</returns>
 /// <seealso cref="Encode(MDToken,out uint)"/>
 public uint Encode(MDToken token)
 {
     return(Encode(token.Raw));
 }
示例#4
0
 /// <summary>
 /// Encodes a token
 /// </summary>
 /// <param name="token">The token</param>
 /// <param name="codedToken">Coded token</param>
 /// <returns><c>true</c> if successful</returns>
 public bool Encode(MDToken token, out uint codedToken) => Encode(token.Raw, out codedToken);
示例#5
0
 /// <summary>
 /// Encodes a token
 /// </summary>
 /// <param name="token">The token</param>
 /// <returns>Coded token</returns>
 /// <seealso cref="Encode(MDToken,out uint)"/>
 public uint Encode(MDToken token) => Encode(token.Raw);
示例#6
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="resourceProvider">Owner</param>
 /// <param name="span">Span</param>
 /// <param name="token">Token</param>
 protected DotNetEmbeddedResource(DotNetResourceProvider resourceProvider, HexBufferSpan span, uint token)
     : base(NAME, span)
 {
     ResourceProvider = resourceProvider ?? throw new ArgumentNullException(nameof(resourceProvider));
     Token            = new MDToken(token);
 }
示例#7
0
 /// <summary>
 /// Gets a record or null if <paramref name="token"/> is invalid
 /// </summary>
 /// <param name="token">Token</param>
 /// <returns></returns>
 public abstract TableRecordData GetRecord(MDToken token);