public WritePayload ( ISerializationContext context, IValueWriter writer ) : void | ||
context | ISerializationContext | |
writer | IValueWriter | |
Результат | void |
public void SourceResultWithoutSource() { const string name = "Name"; var result = Messages.SourceResult.FailedPermissions; var msg = new SourceResultMessage (name, result, null); Assert.AreEqual (result, msg.SourceResult); Assert.AreEqual (name, msg.SourceName); msg.WritePayload (serverContext, writer); long length = stream.Position; stream.Position = 0; msg = new SourceResultMessage (); msg.ReadPayload (clientContext, reader); Assert.AreEqual (length, stream.Position); Assert.AreEqual (result, msg.SourceResult); Assert.AreEqual (name, msg.SourceName); }
public void SourceResult() { const string name = "Name"; var result = Messages.SourceResult.Succeeded; var source = new AudioSource (name, 1, 2, AudioCodecArgsTests.GetTestArgs()); var msg = new SourceResultMessage (name, result, source); Assert.AreEqual (result, msg.SourceResult); Assert.AreEqual (name, msg.SourceName); msg.WritePayload (serverContext, writer); long length = stream.Position; stream.Position = 0; msg = new SourceResultMessage(); msg.ReadPayload (clientContext, reader); Assert.AreEqual (length, stream.Position); Assert.AreEqual (result, msg.SourceResult); Assert.AreEqual (name, msg.SourceName); }