/// <summary>
 /// Initializes a new instance of the <see cref="ASRProtectionEntity" /> class.
 /// </summary>
 /// <param name="pe">Protection entity object to read values from.</param>
 public ASRProtectionEntity(ProtectionEntity pe)
 {
     this.ID       = pe.ID;
     this.ServerId = pe.ServerId;
     this.ProtectionContainerId = pe.ProtectionContainerId;
     this.Name           = pe.Name;
     this.Type           = pe.Type;
     this.FabricObjectId =
         (0 == string.Compare(this.Type, "VirtualMachine", StringComparison.OrdinalIgnoreCase)) ?
         pe.FabricObjectId.ToUpper() :
         pe.FabricObjectId;
     this.Protected = pe.Protected;
     this.ProtectionStateDescription = pe.ProtectionStateDescription;
     this.CanCommit                    = pe.CanCommit;
     this.CanFailover                  = pe.CanFailover;
     this.CanReverseReplicate          = pe.CanReverseReplicate;
     this.ReplicationProvider          = pe.ReplicationProvider;
     this.ActiveLocation               = pe.ActiveLocation;
     this.ReplicationHealth            = pe.ReplicationHealth;
     this.TestFailoverStateDescription = pe.TestFailoverStateDescription;
 }
Exemple #2
0
 /// <summary>
 /// Writes Protection Entity.
 /// </summary>
 /// <param name="pe">Protection Entity</param>
 private void WriteProtectionEntity(ProtectionEntity pe)
 {
     this.WriteObject(new ASRProtectionEntity(pe));
 }