示例#1
0
            public string ToString(WeatherColor.Mask <bool>?printMask = null)
            {
                var fg = new FileGeneration();

                ToString(fg, printMask);
                return(fg.ToString());
            }
示例#2
0
 public void ToString(FileGeneration fg, WeatherColor.Mask <bool>?printMask = null)
 {
     fg.AppendLine($"{nameof(WeatherColor.Mask<TItem>)} =>");
     fg.AppendLine("[");
     using (new DepthWrapper(fg))
     {
         if (printMask?.Sunrise ?? true)
         {
             fg.AppendItem(Sunrise, "Sunrise");
         }
         if (printMask?.Day ?? true)
         {
             fg.AppendItem(Day, "Day");
         }
         if (printMask?.Sunset ?? true)
         {
             fg.AppendItem(Sunset, "Sunset");
         }
         if (printMask?.Night ?? true)
         {
             fg.AppendItem(Night, "Night");
         }
     }
     fg.AppendLine("]");
 }
示例#3
0
            public Mask <R> Translate <R>(Func <TItem, R> eval)
            {
                var ret = new WeatherColor.Mask <R>();

                this.Translate_InternalFill(ret, eval);
                return(ret);
            }