本文整理汇总了C#中RecordReader类的典型用法代码示例。如果您正苦于以下问题:C# RecordReader类的具体用法?C# RecordReader怎么用?C# RecordReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RecordReader类属于命名空间,在下文中一共展示了RecordReader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadField
internal override void ReadField(RecordReader reader)
{
while (!reader.IsEndOfSegment)
{
List.Add(reader.ReadReference(FormKindSet.Any));
}
}
示例2: UnknownRecord
internal UnknownRecord(Module module, RecordReader reader)
: base(module, reader)
{
while (reader.ReadField()) {
new UnknownRecordField(this, ref reader);
}
}
示例3: UnknownRecordField
internal UnknownRecordField(UnknownRecord record, ref RecordReader reader)
: base(record, reader.Field.Type)
{
RecordField field = reader.Field;
Data = reader.Reader.ReadBytes(field.Size);
}
示例4: FormLoader
public FormLoader(Plugin plugin, RecordReader stockReader, bool lazyLoading, int backgroundJobs)
{
if (backgroundJobs < 0)
throw new ArgumentException("Number of bakcground jobs must be a positive integer or zero");
sharedData = new SharedData()
{
Plugin = plugin,
StockReader = stockReader,
LazyLoading = lazyLoading,
FormsToLoad = new BlockingCollection<Form>(new ConcurrentQueue<Form>(), 1024),
WorkerCompleteEvent = new AutoResetEvent(false)
};
this.stockReader = stockReader;
asyncLoading = backgroundJobs > 0;
bool useStockReader = true;
while (backgroundJobs-- > 0)
{
Worker worker = new Worker(sharedData, useStockReader);
worker.RunWorkerCompleted += Worker_RunWorkerCompleted;
worker.RunWorkerAsync();
workers.Add(new WorkerInfo()
{
Worker = worker
});
// Only the first worker can use the stock reader
useStockReader = false;
}
}
示例5: RecordKEY
public RecordKEY(RecordReader rr)
{
FLAGS = rr.ReadUInt16();
PROTOCOL = rr.ReadByte();
ALGORITHM = rr.ReadByte();
PUBLICKEY = rr.ReadString();
}
示例6: RecordA
///<summary>
///</summary>
///<param name="rr"></param>
public RecordA(RecordReader rr)
{
IPAddress.TryParse(string.Format("{0}.{1}.{2}.{3}",
rr.ReadByte(),
rr.ReadByte(),
rr.ReadByte(),
rr.ReadByte()), out Address);
}
示例7: RecordNULL
///<summary>
///</summary>
///<param name="rr"></param>
public RecordNULL(RecordReader rr)
{
rr.Position -= 2;
// re-read length
var rdlength = rr.ReadUInt16();
Anything = new byte[rdlength];
Anything = rr.ReadBytes(rdlength);
}
示例8: RecordNXT
public RecordNXT(RecordReader rr)
{
ushort length = rr.ReadUInt16(-2);
NEXTDOMAINNAME = rr.ReadDomainName();
length -= (ushort)rr.Position;
BITMAP = new byte[length];
BITMAP = rr.ReadBytes(length);
}
示例9: RecordNAPTR
///<summary>
///</summary>
///<param name="rr"></param>
public RecordNAPTR(RecordReader rr)
{
Order = rr.ReadUInt16();
Preference = rr.ReadUInt16();
Flags = rr.ReadString();
Services = rr.ReadString();
Regexp = rr.ReadString();
Replacement = rr.ReadDomainName();
}
示例10: X25Record
public X25Record(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
m_psdnAddress = recordReader.ReadString();
}
示例11: NSAPPTRRecord
public NSAPPTRRecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
m_owner = recordReader.ReadString();
}
示例12: RecordDS
public RecordDS(RecordReader rr)
{
ushort length = rr.ReadUInt16(-2);
KEYTAG = rr.ReadUInt16();
ALGORITHM = rr.ReadByte();
DIGESTTYPE = rr.ReadByte();
length -= 4;
DIGEST = new byte[length];
DIGEST = rr.ReadBytes(length);
}
示例13: RecordSOA
public RecordSOA(RecordReader rr)
{
MNAME = rr.ReadDomainName();
RNAME = rr.ReadDomainName();
SERIAL = rr.ReadUInt32();
REFRESH = rr.ReadUInt32();
RETRY = rr.ReadUInt32();
EXPIRE = rr.ReadUInt32();
MINIMUM = rr.ReadUInt32();
}
示例14: MGRecord
public MGRecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
m_mgmName = recordReader.ReadDomainName();
}
示例15: ARecord
public ARecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
m_address = new IPAddress(recordReader.ReadBytes(4));
}