/// <summary> /// Write Protection Container. /// </summary> /// <param name="protectionContainer">Protection Container</param> private void WriteProtectionContainer(ProtectionContainer protectionContainer) { this.WriteObject(new ASRProtectionContainer(protectionContainer)); }
/// <summary> /// Initializes a new instance of the <see cref="ASRProtectionContainer" /> class with /// required parameters. /// </summary> /// <param name="pc">Protection container object</param> public ASRProtectionContainer(ProtectionContainer pc) { if (pc.AvailableProtectionProfiles != null) { this.AvailableProtectionProfiles = new List<ASRProtectionProfile>(); foreach (var profile in pc.AvailableProtectionProfiles) { this.AvailableProtectionProfiles.Add( new ASRProtectionProfile(profile)); } } this.ID = pc.ID; this.Name = pc.Name; this.Role = pc.Role; this.ServerId = pc.ServerId; this.FabricObjectId = pc.FabricObjectId; this.FabricType = pc.FabricType; this.Type = pc.Type; }
/// <summary> /// Initializes a new instance of the <see cref="ASRProtectionContainer" /> class with /// required parameters. /// </summary> /// <param name="pc">Protection container object</param> public ASRProtectionContainer(ProtectionContainer pc) { this.ID = pc.ID; this.Name = pc.Name; this.ConfigurationStatus = pc.ConfigurationStatus; this.Role = pc.Role; this.ServerId = pc.ServerId; this.FabricObjectId = pc.FabricObjectId; }