当前位置: 首页>>代码示例>>C#>>正文


C# MemoryStream.WriteKey方法代码示例

本文整理汇总了C#中System.IO.MemoryStream.WriteKey方法的典型用法代码示例。如果您正苦于以下问题:C# MemoryStream.WriteKey方法的具体用法?C# MemoryStream.WriteKey怎么用?C# MemoryStream.WriteKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.IO.MemoryStream的用法示例。


在下文中一共展示了MemoryStream.WriteKey方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Write

 public void Write(MemoryStream pStream)
 {
     pStream.WriteKey(EMessageKeyType.Variable, LabelTag);
     pStream.WriteVariable(mLabel);
     pStream.WriteKey(EMessageKeyType.Variable, EpochTag);
     pStream.WriteVariable(mEpoch);
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:7,代码来源:ProcessId.cs

示例2: Write

 public void Write(MemoryStream pStream)
 {
     pStream.WriteKey(EMessageKeyType.Fixed64, HighTag);
     pStream.WriteFixed64(mHigh);
     pStream.WriteKey(EMessageKeyType.Fixed64, LowTag);
     pStream.WriteFixed64(mLow);
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:7,代码来源:EntityId.cs

示例3: Write

 public void Write(MemoryStream pStream)
 {
     pStream.WriteKey(EMessageKeyType.Fixed32, HashTag);
     pStream.WriteFixed32(mHash);
     pStream.WriteKey(EMessageKeyType.Variable, IdTag);
     pStream.WriteVariable(mId);
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:7,代码来源:BoundService.cs

示例4: Write

 public void Write(MemoryStream pStream)
 {
     pStream.WriteKey(EMessageKeyType.Prefixed, HostTag);
     pStream.WritePackable(mHost);
     if (mHasObjectId)
     {
         pStream.WriteKey(EMessageKeyType.Variable, ObjectIdTag);
         pStream.WriteVariable(mObjectId);
     }
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:10,代码来源:ObjectAddress.cs

示例5: Write

 public void Write(MemoryStream pStream)
 {
     if (mHasClientId)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, ClientIdTag);
         pStream.WritePackable(mClientId);
     }
     if (mHasBindRequest)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, BindRequestTag);
         pStream.WritePackable(mBindRequest);
     }
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:13,代码来源:ConnectRequest.cs

示例6: Write

 public void Write(MemoryStream pStream)
 {
     mContentHandles.ForEach(h =>
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, ContentHandleTag);
         pStream.WritePackable(h);
     });
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:8,代码来源:ConnectionMeteringContentHandles.cs

示例7: Write

 public void Write(MemoryStream pStream)
 {
     if (mImportedServiceIds.Count > 0)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, ImportedServiceIdTag);
         MemoryStream stream = new MemoryStream();
         mImportedServiceIds.ForEach(i => stream.WriteVariable(i));
         pStream.WritePrefixed(stream);
     }
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:10,代码来源:BindResponse.cs

示例8: Write

 public void Write(MemoryStream pStream)
 {
     pStream.WriteKey(EMessageKeyType.Prefixed, ObjectAddressTag);
     pStream.WritePackable(mObjectAddress);
     pStream.WriteKey(EMessageKeyType.Variable, StatusTag);
     pStream.WriteVariable(mStatus);
     pStream.WriteKey(EMessageKeyType.Variable, ServiceHashTag);
     pStream.WriteVariable(mServiceHash);
     pStream.WriteKey(EMessageKeyType.Variable, MethodIdTag);
     pStream.WriteVariable(mMethodId);
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:11,代码来源:ErrorInfo.cs

示例9: Write

 public void Write(MemoryStream pStream)
 {
     pStream.WriteKey(EMessageKeyType.Variable, ServiceIdTag);
     pStream.WriteVariable(mServiceId);
     if (mHasMethodId)
     {
         pStream.WriteKey(EMessageKeyType.Variable, MethodIdTag);
         pStream.WriteVariable(mMethodId);
     }
     pStream.WriteKey(EMessageKeyType.Variable, TokenTag);
     pStream.WriteVariable(mToken);
     if (mHasObjectId)
     {
         pStream.WriteKey(EMessageKeyType.Variable, ObjectIdTag);
         pStream.WriteVariable(mObjectId);
     }
     if (mHasSize)
     {
         pStream.WriteKey(EMessageKeyType.Variable, SizeTag);
         pStream.WriteVariable(mSize);
     }
     if (mHasStatus)
     {
         pStream.WriteKey(EMessageKeyType.Variable, StatusTag);
         pStream.WriteVariable(mStatus);
     }
     mErrors.ForEach(e =>
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, ErrorTag);
         pStream.WritePackable(e);
     });
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:32,代码来源:Header.cs

示例10: Write

 public void Write(MemoryStream pStream)
 {
     if (mImportedServiceHashes.Count > 0)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, ImportedServiceHashTag);
         MemoryStream stream = new MemoryStream();
         mImportedServiceHashes.ForEach(h => stream.WriteFixed32(h));
         pStream.WritePrefixed(stream);
     }
     mExportedServices.ForEach(s =>
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, ExportedServiceTag);
         pStream.WritePackable(s);
     });
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:15,代码来源:BindRequest.cs

示例11: Write

 public void Write(MemoryStream pStream)
 {
     pStream.WriteKey(EMessageKeyType.Variable, ErrorCodeTag);
     pStream.WriteVariable(mErrorCode);
     if (mHasAccount)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, AccountTag);
         pStream.WritePackable(mAccount);
     }
     mGameAccounts.ForEach(a =>
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, GameAccountTag);
         pStream.WritePackable(a);
     });
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:15,代码来源:LogonResult.cs

示例12: Write

 public void Write(MemoryStream pStream)
 {
     pStream.WriteKey(EMessageKeyType.Fixed32, RegionTag);
     pStream.WriteFixed32(mRegion);
     pStream.WriteKey(EMessageKeyType.Fixed32, UsageTag);
     pStream.WriteFixed32(mUsage);
     pStream.WriteKey(EMessageKeyType.Prefixed, HashTag);
     pStream.WritePrefixed(mHash);
     if (mHasProtoUrl)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, ProtoUrlTag);
         pStream.WritePrefixed(Encoding.GetEncoding(1252), mProtoUrl);
     }
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:14,代码来源:ContentHandle.cs

示例13: Write

 public void Write(MemoryStream pStream)
 {
     pStream.WriteKey(EMessageKeyType.Prefixed, ServerIdTag);
     pStream.WritePackable(mServerId);
     if (mHasClientId)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, ClientIdTag);
         pStream.WritePackable(mClientId);
     }
     if (mHasBindResult)
     {
         pStream.WriteKey(EMessageKeyType.Variable, BindResultTag);
         pStream.WriteVariable(mBindResult);
     }
     if (mHasBindResponse)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, BindResponseTag);
         pStream.WritePackable(mBindResponse);
     }
     if (mHasConnectionMeteringContentHandles)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, ConnectionMeteringContentHandlesTag);
         pStream.WritePackable(mConnectionMeteringContentHandles);
     }
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:25,代码来源:ConnectResponse.cs

示例14: Write

 public void Write(MemoryStream pStream)
 {
     if (mHasProgram)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, ProgramTag);
         pStream.WritePrefixed(Encoding.GetEncoding(1252), mProgram);
     }
     if (mHasPlatform)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, PlatformTag);
         pStream.WritePrefixed(Encoding.GetEncoding(1252), mPlatform);
     }
     if (mHasLocale)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, LocaleTag);
         pStream.WritePrefixed(Encoding.GetEncoding(1252), mLocale);
     }
     if (mHasEmail)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, EmailTag);
         pStream.WritePrefixed(Encoding.GetEncoding(1252), mEmail);
     }
     if (mHasVersion)
     {
         pStream.WriteKey(EMessageKeyType.Prefixed, VersionTag);
         pStream.WritePrefixed(Encoding.GetEncoding(1252), mVersion);
     }
     if (mHasApplicationVersion)
     {
         pStream.WriteKey(EMessageKeyType.Variable, ApplicationVersionTag);
         pStream.WriteVariable(mApplicationVersion);
     }
     if (mHasCookieOnly)
     {
         pStream.WriteKey(EMessageKeyType.Variable, CookieOnlyTag);
         pStream.WriteVariable((ulong)(mCookieOnly ? 1 : 0));
     }
 }
开发者ID:Astaelan,项目名称:Tristram,代码行数:38,代码来源:LogonRequest.cs


注:本文中的System.IO.MemoryStream.WriteKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。