Beispiel #1
0
 public static MultiCard Clone(this MultiCard card)
 {
     var ret = new MultiCard(card);
     foreach (var p in card.Properties)
     {
         ret.Properties.Add(p.Key, p.Value);
     }
     return ret;
 }
Beispiel #2
0
 public static MultiCard Clone(this MultiCard card)
 {
     var ret = new MultiCard
                   {
                       Name = card.Name.Clone() as string,
                       Id = card.Id,
                       Alternate = card.Alternate.Clone() as string,
                       ImageUri = card.ImageUri.Clone() as string,
                       Quantity = card.Quantity,
                       Properties = new Dictionary<string,CardPropertySet>(),
                       SetId = card.SetId
                   };
     foreach (var p in card.Properties)
     {
         ret.Properties.Add(p.Key, p.Value);
     }
     return ret;
 }
 public static MultiCard Clone(this MultiCard card)
 {
     var ret = new MultiCard
                   {
                       Name = card.Name,
                       Id = card.Id,
                       Alternate = card.Alternate,
                       Dependent = card.Dependent,
                       ImageUri = card.ImageUri,
                       IsMutable = card.IsMutable,
                       Quantity = card.Quantity,
                       Properties = new Dictionary<PropertyDef, object>()
                   };
     foreach (var p in card.Properties)
     {
         ret.Properties.Add(p.Key, p.Value);
     }
     return ret;
 }
Beispiel #4
0
 public static MultiCard ToMultiCard(this ICard card, int quantity = 1)
 {
     var ret = new MultiCard();
     ret.Alternate = card.Alternate.Clone() as String;
     ret.Id = card.Id;
     ret.ImageUri = card.ImageUri.Clone() as String;
     ret.Name = card.Name.Clone() as String;
     ret.Quantity = quantity;
     ret.SetId = card.SetId;
     ret.Properties = card.Properties.ToDictionary(x => x.Key, y => y.Value);
     return ret;
 }
Beispiel #5
0
 public static MultiCard ToMultiCard(this ICard card, int quantity = 1, bool clone = true)
 {
     var ret = new MultiCard(card, quantity);
     return ret;
 }