當前位置: 首頁>>代碼示例>>C#>>正文


C# hsStream.WriteULong方法代碼示例

本文整理匯總了C#中Plasma.hsStream.WriteULong方法的典型用法代碼示例。如果您正苦於以下問題:C# hsStream.WriteULong方法的具體用法?C# hsStream.WriteULong怎麽用?C# hsStream.WriteULong使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Plasma.hsStream的用法示例。


在下文中一共展示了hsStream.WriteULong方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Write

 public void Write(hsStream s)
 {
     pnVaultNodeFields f = Fields;
     s.WriteULong((ulong)f);
     for (ulong bit = 1; bit != 0 && bit <= (ulong)f; bit <<= 1) {
         switch (f & (pnVaultNodeFields)bit) {
             case pnVaultNodeFields.Blob_1:
                 s.WriteInt(fBlob[0].Length);
                 s.WriteBytes(fBlob[0]);
                 break;
             case pnVaultNodeFields.Blob_2:
                 s.WriteInt(fBlob[1].Length);
                 s.WriteBytes(fBlob[1]);
                 break;
             case pnVaultNodeFields.CreateAgeName:
                 pnHelpers.WriteString(s, fCreateAgeName);
                 break;
             case pnVaultNodeFields.CreateAgeUuid:
                 pnHelpers.WriteUuid(s, fCreateAgeGuid.Value);
                 break;
             case pnVaultNodeFields.CreateTime:
                 TimeSpan cts = fCreateTime.Value - plUnifiedTime.Epoch;
                 s.WriteUInt((uint)cts.Seconds);
                 break;
             case pnVaultNodeFields.CreatorIdx:
                 s.WriteUInt(fCreatorID.Value);
                 break;
             case pnVaultNodeFields.CreatorUuid:
                 pnHelpers.WriteUuid(s, fCreatorGuid.Value);
                 break;
             case pnVaultNodeFields.Int32_1:
                 s.WriteInt(fInt32[0].Value);
                 break;
             case pnVaultNodeFields.Int32_2:
                 s.WriteInt(fInt32[1].Value);
                 break;
             case pnVaultNodeFields.Int32_3:
                 s.WriteInt(fInt32[2].Value);
                 break;
             case pnVaultNodeFields.Int32_4:
                 s.WriteInt(fInt32[3].Value);
                 break;
             case pnVaultNodeFields.IString64_1:
                 pnHelpers.WriteString(s, fIString64[0]);
                 break;
             case pnVaultNodeFields.IString64_2:
                 pnHelpers.WriteString(s, fIString64[1]);
                 break;
             case pnVaultNodeFields.ModifyTime:
                 TimeSpan mts = fModifyTime.Value - plUnifiedTime.Epoch;
                 s.WriteUInt((uint)mts.Seconds);
                 break;
             case pnVaultNodeFields.NodeIdx:
                 s.WriteUInt(fNodeID.Value);
                 break;
             case pnVaultNodeFields.NodeType:
                 s.WriteUInt((uint)fNodeType);
                 break;
             case pnVaultNodeFields.String64_1:
                 pnHelpers.WriteString(s, fString64[0]);
                 break;
             case pnVaultNodeFields.String64_2:
                 pnHelpers.WriteString(s, fString64[1]);
                 break;
             case pnVaultNodeFields.String64_3:
                 pnHelpers.WriteString(s, fString64[2]);
                 break;
             case pnVaultNodeFields.String64_4:
                 pnHelpers.WriteString(s, fString64[3]);
                 break;
             case pnVaultNodeFields.String64_5:
                 pnHelpers.WriteString(s, fString64[4]);
                 break;
             case pnVaultNodeFields.String64_6:
                 pnHelpers.WriteString(s, fString64[5]);
                 break;
             case pnVaultNodeFields.Text_1:
                 pnHelpers.WriteString(s, fText[0]);
                 break;
             case pnVaultNodeFields.Text_2:
                 pnHelpers.WriteString(s, fText[1]);
                 break;
             case pnVaultNodeFields.UInt32_1:
                 s.WriteUInt(fUInt32[0].Value);
                 break;
             case pnVaultNodeFields.UInt32_2:
                 s.WriteUInt(fUInt32[1].Value);
                 break;
             case pnVaultNodeFields.UInt32_3:
                 s.WriteUInt(fUInt32[2].Value);
                 break;
             case pnVaultNodeFields.UInt32_4:
                 s.WriteUInt(fUInt32[3].Value);
                 break;
             case pnVaultNodeFields.Uuid_1:
                 pnHelpers.WriteUuid(s, fGuid[0].Value);
                 break;
             case pnVaultNodeFields.Uuid_2:
                 pnHelpers.WriteUuid(s, fGuid[1].Value);
                 break;
//.........這裏部分代碼省略.........
開發者ID:Hoikas,項目名稱:PlasmaDotNet,代碼行數:101,代碼來源:VaultNode.cs


注:本文中的Plasma.hsStream.WriteULong方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。