Пример #1
0
 static void Print(InventoryItemDetails details)
 {
     Console.WriteLine("{0}: {1} {2}",
                       details.Name,
                       details.Total,
                       details.Active ? "" : "(deactivated)");
 }
Пример #2
0
 static void Print(InventoryItemDetails details)
 {
     Console.WriteLine("{0}: {1} {2}",
         details.Name,
         details.Total,
         details.Active ? "" : "(deactivated)");
 }
Пример #3
0
        public static object DeepCopier(object original)
        {
            Example.InventoryItemDetails input  = ((Example.InventoryItemDetails)(original));
            Example.InventoryItemDetails result = ((Example.InventoryItemDetails)(System.Runtime.Serialization.FormatterServices.GetUninitializedObject(typeof(Example.InventoryItemDetails))));
            Orleans.Serialization.SerializationContext.Current.RecordObject(original, result);
            object objResult = ((object)(result));
            object temp1     = input.Active;

            fieldInfo1.SetValue(objResult, temp1);
            object temp2 = input.Name;

            fieldInfo2.SetValue(objResult, temp2);
            object temp3 = input.Total;

            fieldInfo3.SetValue(objResult, temp3);
            return(objResult);
        }