本文整理匯總了C#中PEAPI.MetaData.AddToBlobHeap方法的典型用法代碼示例。如果您正苦於以下問題:C# MetaData.AddToBlobHeap方法的具體用法?C# MetaData.AddToBlobHeap怎麽用?C# MetaData.AddToBlobHeap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PEAPI.MetaData
的用法示例。
在下文中一共展示了MetaData.AddToBlobHeap方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: BuildTables
internal sealed override void BuildTables(MetaData md)
{
md.AddToTable(MDTable.CustomAttribute, this);
if (byteVal == null) {
valIx = 0;
return;
}
BinaryWriter bw = new BinaryWriter(new MemoryStream());
bw.Write(byteVal);
MemoryStream str = (MemoryStream)bw.BaseStream;
valIx = md.AddToBlobHeap(str.ToArray());
}
示例2: GetSigIx
internal override uint GetSigIx(MetaData md)
{
MemoryStream sig = new MemoryStream();
TypeSig(sig);
return md.AddToBlobHeap(sig.ToArray());
}
示例3: GetBlobIndex
internal sealed override uint GetBlobIndex(MetaData md)
{
if (!addedToBlobHeap) {
byte [] b = Encoding.Unicode.GetBytes (val);
blobIndex = md.AddToBlobHeap(b);
addedToBlobHeap = true;
}
return blobIndex;
}
示例4: BuildTables
internal sealed override void BuildTables(MetaData md)
{
if (done) return;
MemoryStream sig = new MemoryStream();
sig.WriteByte((byte)callConv);
MetaData.CompressNum(numPars+numOptPars,sig);
returnType.TypeSig(sig);
for (int i=0; i < numPars; i++) {
parameters[i].TypeSig(sig);
}
sigIx = md.AddToBlobHeap(sig.ToArray());
if (numOptPars > 0) {
sig.WriteByte(Sentinel);
for (int i=0; i < numOptPars; i++) {
optParams[i].TypeSig(sig);
}
}
done = true;
}
示例5: TypeSpec
internal TypeSpec(Type aType, MetaData md)
{
MemoryStream sig = new MemoryStream();
aType.TypeSig(sig);
sigIx = md.AddToBlobHeap(sig.ToArray());
tabIx = MDTable.TypeSpec;
}
示例6: FileRef
internal FileRef(uint nameIx, byte[] hashBytes, bool metaData,
bool entryPoint, MetaData md) {
if (!metaData) flags = NoMetaData;
if (entryPoint) md.SetEntryPoint(this);
this.nameIx = nameIx;
hashIx = md.AddToBlobHeap(hashBytes);
tabIx = MDTable.File;
}