public static void Serialize(DataContractObject so, Stream outputStream) { IDataContractSurrogate dataContractSurrogate = new DataContractActorSurrogate(); DataContractSerializer dcs = new DataContractSerializer(typeof(DataContractObject), null, 1000, true, true, dataContractSurrogate); dcs.WriteObject(outputStream, so); }
public void Serialize(object data, ActorTag tag, Stream stream) { DataContractObject dco = new DataContractObject(data, tag); DataContractActorSerializer.Serialize(dco, stream); }