/// <summary>
 /// Initializes a new instance of the ApplicationHealthPolicyMapItem class.
 /// </summary>
 /// <param name="key">The key of the application health policy map item. This is the name of the application.</param>
 /// <param name="value">The value of the application health policy map item. This is the ApplicationHealthPolicy for
 /// this application.</param>
 public ApplicationHealthPolicyMapItem(
     ApplicationName key,
     ApplicationHealthPolicy value)
 {
     key.ThrowIfNull(nameof(key));
     value.ThrowIfNull(nameof(value));
     this.Key   = key;
     this.Value = value;
 }
 /// <summary>
 /// Initializes a new instance of the ApplicationUpgradeUpdateDescription class.
 /// </summary>
 /// <param name="name">The name of the application, including the 'fabric:' URI scheme.</param>
 /// <param name="upgradeKind">The kind of upgrade out of the following possible values. Possible values include:
 /// 'Invalid', 'Rolling'</param>
 /// <param name="applicationHealthPolicy">Defines a health policy used to evaluate the health of an application or one
 /// of its children entities.
 /// </param>
 /// <param name="updateDescription">Describes the parameters for updating a rolling upgrade of application or
 /// cluster.</param>
 public ApplicationUpgradeUpdateDescription(
     ApplicationName name,
     UpgradeKind?upgradeKind = Common.UpgradeKind.Rolling,
     ApplicationHealthPolicy applicationHealthPolicy   = default(ApplicationHealthPolicy),
     RollingUpgradeUpdateDescription updateDescription = default(RollingUpgradeUpdateDescription))
 {
     name.ThrowIfNull(nameof(name));
     upgradeKind.ThrowIfNull(nameof(upgradeKind));
     this.Name                    = name;
     this.UpgradeKind             = upgradeKind;
     this.ApplicationHealthPolicy = applicationHealthPolicy;
     this.UpdateDescription       = updateDescription;
 }
 /// <summary>
 /// Initializes a new instance of the ApplicationDescription class.
 /// </summary>
 /// <param name="name">The name of the application, including the 'fabric:' URI scheme.</param>
 /// <param name="typeName">The application type name as defined in the application manifest.</param>
 /// <param name="typeVersion">The version of the application type as defined in the application manifest.</param>
 /// <param name="parameters">List of application parameters with overridden values from their default values specified
 /// in the application manifest.</param>
 /// <param name="applicationCapacity">Describes capacity information for services of this application. This description
 /// can be used for describing the following.
 /// - Reserving the capacity for the services on the nodes
 /// - Limiting the total number of nodes that services of this application can run on
 /// - Limiting the custom capacity metrics to limit the total consumption of this metric by the services of this
 /// application
 /// </param>
 public ApplicationDescription(
     ApplicationName name,
     string typeName,
     string typeVersion,
     IReadOnlyDictionary <string, string> parameters    = default(IReadOnlyDictionary <string, string>),
     ApplicationCapacityDescription applicationCapacity = default(ApplicationCapacityDescription))
 {
     name.ThrowIfNull(nameof(name));
     typeName.ThrowIfNull(nameof(typeName));
     typeVersion.ThrowIfNull(nameof(typeVersion));
     this.Name                = name;
     this.TypeName            = typeName;
     this.TypeVersion         = typeVersion;
     this.Parameters          = parameters;
     this.ApplicationCapacity = applicationCapacity;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the ServiceFromTemplateDescription class.
 /// </summary>
 /// <param name="applicationName">The name of the application, including the 'fabric:' URI scheme.</param>
 /// <param name="serviceName">The full name of the service with 'fabric:' URI scheme.</param>
 /// <param name="serviceTypeName">Name of the service type as specified in the service manifest.</param>
 /// <param name="initializationData">The initialization data for the newly created service instance.</param>
 /// <param name="servicePackageActivationMode">The activation mode of service package to be used for a service.
 /// Possible values include: 'SharedProcess', 'ExclusiveProcess'
 ///
 /// The activation mode of service package to be used for a Service Fabric service. This is specified at the time of
 /// creating the Service.
 /// </param>
 /// <param name="serviceDnsName">The DNS name of the service. It requires the DNS system service to be enabled in
 /// Service Fabric cluster.</param>
 public ServiceFromTemplateDescription(
     ApplicationName applicationName,
     ServiceName serviceName,
     string serviceTypeName,
     byte[] initializationData = default(byte[]),
     ServicePackageActivationMode?servicePackageActivationMode = default(ServicePackageActivationMode?),
     string serviceDnsName = default(string))
 {
     applicationName.ThrowIfNull(nameof(applicationName));
     serviceName.ThrowIfNull(nameof(serviceName));
     serviceTypeName.ThrowIfNull(nameof(serviceTypeName));
     this.ApplicationName              = applicationName;
     this.ServiceName                  = serviceName;
     this.ServiceTypeName              = serviceTypeName;
     this.InitializationData           = initializationData;
     this.ServicePackageActivationMode = servicePackageActivationMode;
     this.ServiceDnsName               = serviceDnsName;
 }