/// <summary> /// Add image /// </summary> /// <param name="deployment"></param> /// <param name="name"></param> /// <param name="imageName"></param> /// <param name="version"></param> /// <param name="createOptions"></param> /// <param name="restart"></param> /// <param name="properties"></param> /// <returns></returns> public static IEdgeDeployment WithModule(this IEdgeDeployment deployment, string name, string imageName, System.Version version, CreateContainerParameters createOptions, ModuleRestartPolicy restart, Dictionary <string, dynamic> properties) { return(deployment.WithModule(name, imageName, version, createOptions, restart, false, properties)); }
/// <summary> /// Add image /// </summary> /// <param name="deployment"></param> /// <param name="name"></param> /// <param name="imageName"></param> /// <param name="version"></param> /// <param name="createOptions"></param> /// <param name="restart"></param> /// <param name="stopped"></param> /// <param name="properties"></param> /// <returns></returns> public static IEdgeDeployment WithModule(this IEdgeDeployment deployment, string name, string imageName, System.Version version, CreateContainerParameters createOptions, ModuleRestartPolicy restart, bool stopped, Dictionary <string, dynamic> properties) { return(deployment.WithModule(new EdgeDeploymentModuleModel { CreateOptions = createOptions, ImageName = imageName, Name = name, Properties = properties, RestartPolicy = restart != ModuleRestartPolicy.Always ? restart : (ModuleRestartPolicy?)null, Stopped = stopped ? true : (bool?)null, Version = version?.ToString() })); }