Exemplo n.º 1
0
 /// <summary>
 ///     Gets the command arguments corresponding to the specified settings
 /// </summary>
 /// <returns>An action to add required command arguments</returns>
 public Action <ProcessArgumentBuilder> GetToolArguments()
 {
     return(args =>
     {
         args.Add(RemoveAll, "all");
         args.Add(Force, "force");
         if (BoxVersion.HasValue())
         {
             args.AppendSwitchQuoted("--box-version", BoxVersion);
         }
         args.Add(Provider, "provider");
     });
 }
Exemplo n.º 2
0
        private string GetLocalPlanVersion(int planId)
        {
            //[{"boxId":1, "boxVersion":"123"}, {"boxId":2, "boxVersion":"234"}]
            ContentModel      localModel  = PlayerPrefsUtil.GetLocalContentModel(planId);
            string            json        = "";
            List <BoxVersion> boxVersions = new List <BoxVersion>();

            if (localModel.IsNotNull())
            {
                foreach (var boxModel in localModel.boxList)
                {
                    BoxVersion box = new BoxVersion();
                    box.boxId      = boxModel.boxId;
                    box.boxVersion = boxModel.boxVersion;
                    boxVersions.Add(box);
                }
            }

            if (boxVersions.Count > 0)
            {
                json = JsonConvert.SerializeObject(boxVersions, Formatting.None);
            }
            return(json);
        }
Exemplo n.º 3
0
 private BoxFactory()
 {
     commboxes = new Dictionary<BoxVersion, ICommbox>();
     version = BoxVersion.C168;
     streamType = Diag.StreamType.SerialPort;
 }
Exemplo n.º 4
0
 private BoxFactory()
 {
     commboxes  = new Dictionary <BoxVersion, ICommbox>();
     version    = BoxVersion.C168;
     streamType = Diag.StreamType.SerialPort;
 }