/// <summary>
 /// Write Powershell Server.
 /// </summary>
 /// <param name="server">Fabric object</param>
 /// <param name="provider">Recovery Service Provider object</param>
 private void WriteServer(Fabric fabric, RecoveryServicesProvider provider)
 {
     this.WriteObject(new ASRServer(fabric, provider));
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ASRServer" /> class with required 
 /// parameters.
 /// </summary>
 /// <param name="server">Server object</param>
 public ASRServer(Fabric fabric, RecoveryServicesProvider provider)
 {
     this.ID = provider.Id;
     this.Name = provider.Name;
     this.FriendlyName = provider.Properties.FriendlyName;
     if(provider.Properties.LastHeartbeat != null)
     {
         this.LastHeartbeat = (DateTime)provider.Properties.LastHeartbeat;
     }
     this.ProviderVersion = provider.Properties.ProviderVersion;
     this.ServerVersion = provider.Properties.ServerVersion;
     this.Connected = provider.Properties.ConnectionStatus.ToLower().CompareTo("connected") == 0 ?  true: false;
     this.FabricType = provider.Properties.FabricType;
     this.Type = provider.Type;
 }
 /// <summary>
 /// Write Powershell Recovery Services Provider.
 /// </summary>
 /// <param name="provider">Recovery Service Provider object</param>
 private void WriteServicesProvider(RecoveryServicesProvider provider)
 {
     this.WriteObject(new ASRRecoveryServicesProvider(provider));
 }