Ejemplo n.º 1
0
        private static ResourceManager.Resources.Models.Plan GetPlan()
        {
            var plan = new ResourceManager.Resources.Models.Plan();

            plan.Name          = "name";
            plan.Product       = "product";
            plan.Publisher     = "publisher";
            plan.PromotionCode = "promo";
            plan.Version       = "version";
            return(plan);
        }
Ejemplo n.º 2
0
        private static GenericResourceExpanded GetGenereicResource(
            Dictionary <string, string> tags,
            ResourceManager.Resources.Models.Sku sku,
            ResourceManager.Resources.Models.Plan plan,
            string kind,
            string managedBy,
            string location)
        {
            var resource = new GenericResourceExpanded();

            resource.Location  = location;
            resource.Tags      = tags ?? new Dictionary <string, string>();
            resource.Sku       = sku;
            resource.Plan      = plan;
            resource.Kind      = kind;
            resource.ManagedBy = managedBy;
            return(resource);
        }
Ejemplo n.º 3
0
        private static GenericResourceExpanded GetGenereicResource(
            Dictionary <string, string> tags,
            ResourceManager.Resources.Models.Sku sku,
            ResourceManager.Resources.Models.Plan plan,
            string kind,
            string managedBy,
            string location)
        {
            var resource = new GenericResourceExpanded();

            // See TODO in GenericResourceOperations.Valide().
            // resource.Id = "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup";
            resource.Location  = location;
            resource.Tags      = tags ?? new Dictionary <string, string>();
            resource.Sku       = sku;
            resource.Plan      = plan;
            resource.Kind      = kind;
            resource.ManagedBy = managedBy;
            return(resource);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Plan"/> class.
 /// </summary>
 /// <param name="plan"> The plan to copy from. </param>
 internal Plan(ResourceManager.Resources.Models.Plan plan)
     : this(plan.Name, plan.Publisher, plan.Product, plan.PromotionCode, plan.Version)
 {
 }