Exemple #1
0
        public void SetViewSource(CollectionViewSource ViewSource)
        {
            ViewSource.Source = Volumes.Select(x => new ChapterGroup(x));

            VolumeCollections = ViewSource.View.CollectionGroups;
            NotifyChanged("VolumeCollections");
        }
Exemple #2
0
        protected HostingSettings GenerateHostingSettings()
        {
            //todo: add attributes for static env configuration
            var createOptions = new Dictionary <string, object>();
            var env           = new List <string> {
                Constants.ModuleNameConfigName + "=" + Name
            };


            if (Volumes.Count > 0)
            {
                var volumes = string.Join(',', Volumes.Select(e => $"\"/env/{e.Key.ToLower()}\": {{ {e.Value} }}"));
                env.Add($", \"Volumes\": {{ {volumes} }}");
            }

            createOptions.Add("Env", env);
            return(new HostingSettings(Name, createOptions));
        }
 private void AddVolumes(IList <string> arguments)
 {
     arguments.AddConditionally(
         Volumes.Any(),
         string.Join(" ", Volumes.Select(volume => $"--volume {volume}")));
 }