public static object Deserializer(System.Type expected, global::Orleans.Serialization.BinaryTokenStreamReader stream) { Example.CheckInInventoryItem result = ((Example.CheckInInventoryItem)(System.Runtime.Serialization.FormatterServices.GetUninitializedObject(typeof(Example.CheckInInventoryItem)))); object objResult = ((object)(result)); object temp1 = ((int)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(int), stream))); fieldInfo1.SetValue(objResult, temp1); return(objResult); }
public IEnumerable <Event> Handle(CheckInInventoryItem cmd) { CheckIsActive(); if (cmd.Quantity <= 0) { throw new InvalidOperationException("must have a qty greater than 0 to add to inventory"); } yield return(new InventoryItemCheckedIn(cmd.Quantity)); }
public static object DeepCopier(object original) { Example.CheckInInventoryItem input = ((Example.CheckInInventoryItem)(original)); Example.CheckInInventoryItem result = ((Example.CheckInInventoryItem)(System.Runtime.Serialization.FormatterServices.GetUninitializedObject(typeof(Example.CheckInInventoryItem)))); Orleans.Serialization.SerializationContext.Current.RecordObject(original, result); object objResult = ((object)(result)); object temp1 = input.Quantity; fieldInfo1.SetValue(objResult, temp1); return(objResult); }
public static void Serializer(object untypedInput, Orleans.Serialization.BinaryTokenStreamWriter stream, System.Type expected) { Example.CheckInInventoryItem input = ((Example.CheckInInventoryItem)(untypedInput)); Orleans.Serialization.SerializationManager.SerializeInner(input.Quantity, stream, typeof(int)); }