public override byte FrameDataSize(int frameIndex) { if (frameIndex == 0) { return((byte)(DataPrefixSize + ActionFragment.FragmentDataSize(frameIndex))); } else { return(ActionFragment.FragmentDataSize(frameIndex)); } }
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); } }
public byte[] GetPayloadData() { return(ActionFragment.GetExtensionData()); }
public void SetPayloadData(byte[] statePayloadData) { ActionFragment.SetExtensionData(statePayloadData); FrameCount = ActionFragment.FrameCount; }