Exemple #1
0
        public static object Deserializer(System.Type expected, global::Orleans.Serialization.BinaryTokenStreamReader stream)
        {
            Example.RenameInventoryItem result = ((Example.RenameInventoryItem)(System.Runtime.Serialization.FormatterServices.GetUninitializedObject(typeof(Example.RenameInventoryItem))));
            object objResult = ((object)(result));
            object temp1     = ((string)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(string), stream)));

            fieldInfo1.SetValue(objResult, temp1);
            return(objResult);
        }
Exemple #2
0
        public IEnumerable <Event> Handle(RenameInventoryItem cmd)
        {
            CheckIsActive();

            if (string.IsNullOrEmpty(cmd.NewName))
            {
                throw new ArgumentException("Inventory item name cannot be null or empty");
            }

            yield return(new InventoryItemRenamed(name, cmd.NewName));
        }
Exemple #3
0
        public static object DeepCopier(object original)
        {
            Example.RenameInventoryItem input  = ((Example.RenameInventoryItem)(original));
            Example.RenameInventoryItem result = ((Example.RenameInventoryItem)(System.Runtime.Serialization.FormatterServices.GetUninitializedObject(typeof(Example.RenameInventoryItem))));
            Orleans.Serialization.SerializationContext.Current.RecordObject(original, result);
            object objResult = ((object)(result));
            object temp1     = input.NewName;

            fieldInfo1.SetValue(objResult, temp1);
            return(objResult);
        }
Exemple #4
0
 public static void Serializer(object untypedInput, Orleans.Serialization.BinaryTokenStreamWriter stream, System.Type expected)
 {
     Example.RenameInventoryItem input = ((Example.RenameInventoryItem)(untypedInput));
     Orleans.Serialization.SerializationManager.SerializeInner(input.NewName, stream, typeof(string));
 }