コード例 #1
0
 public override byte FrameDataSize(int frameIndex)
 {
     if (frameIndex == 0)
     {
         return((byte)(DataPrefixSize + ActionFragment.FragmentDataSize(frameIndex)));
     }
     else
     {
         return(ActionFragment.FragmentDataSize(frameIndex));
     }
 }
コード例 #2
0
 public ExtensionFragment GetExtension <ExtensionFragment>()
 {
     if (ActionFragment.ExtensionDialect != "GPB")
     {
         throw new Exception("State dialect not Google Protocol Buffers (GPB): " + ActionFragment.ExtensionDialect);
     }
     using (MemoryStream memoryStream = new MemoryStream(ActionFragment.GetExtensionData(), 0, (int)ActionFragment.ExtensionLength))
     {
         ExtensionFragment extensionFragment = Serializer.Deserialize <ExtensionFragment>(memoryStream);
         return(extensionFragment);
     }
 }
コード例 #3
0
 public byte[] GetPayloadData()
 {
     return(ActionFragment.GetExtensionData());
 }
コード例 #4
0
 public void SetPayloadData(byte[] statePayloadData)
 {
     ActionFragment.SetExtensionData(statePayloadData);
     FrameCount = ActionFragment.FrameCount;
 }