示例#1
0
        internal WindowFactory(WindowsProfile profile)
        {
            var newConfigurations = profile.Configurations
                .Where(x => _windowClassTypes.ContainsKey(x.ClassName) == false);

            foreach (var configuration in newConfigurations)
                _windowClassTypes.Add(configuration.ClassName, configuration.WindowType);
        }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public override void Validate()
 {
     base.Validate();
     if (MasterProfile == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "MasterProfile");
     }
     if (AgentPoolProfiles == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "AgentPoolProfiles");
     }
     if (LinuxProfile == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "LinuxProfile");
     }
     if (OrchestratorProfile != null)
     {
         OrchestratorProfile.Validate();
     }
     if (CustomProfile != null)
     {
         CustomProfile.Validate();
     }
     if (ServicePrincipalProfile != null)
     {
         ServicePrincipalProfile.Validate();
     }
     if (MasterProfile != null)
     {
         MasterProfile.Validate();
     }
     if (AgentPoolProfiles != null)
     {
         foreach (var element in AgentPoolProfiles)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (WindowsProfile != null)
     {
         WindowsProfile.Validate();
     }
     if (LinuxProfile != null)
     {
         LinuxProfile.Validate();
     }
     if (DiagnosticsProfile != null)
     {
         DiagnosticsProfile.Validate();
     }
 }
示例#3
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public override void Validate()
 {
     base.Validate();
     if (AgentPoolProfiles != null)
     {
         foreach (var element in AgentPoolProfiles)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (LinuxProfile != null)
     {
         LinuxProfile.Validate();
     }
     if (WindowsProfile != null)
     {
         WindowsProfile.Validate();
     }
     if (ServicePrincipalProfile != null)
     {
         ServicePrincipalProfile.Validate();
     }
     if (AddonProfiles != null)
     {
         foreach (var valueElement in AddonProfiles.Values)
         {
             if (valueElement != null)
             {
                 valueElement.Validate();
             }
         }
     }
     if (NetworkProfile != null)
     {
         NetworkProfile.Validate();
     }
     if (AadProfile != null)
     {
         AadProfile.Validate();
     }
 }
示例#4
0
 public Shell(WindowsProfile profile)
 {
     _windowFactory = new WindowFactory(profile);
 }