Beispiel #1
0
        public Label
        (
            string id,
            string owner,
            DateTime update,
            DateTime access,
            string description,
            bool locked,
            string revision,
            string serverid,
            ViewMap viewmap,
            FormSpec spec,
            string options
        )
        {
            Id          = id;
            Owner       = owner;
            Update      = update;
            Access      = access;
            Description = description;
            Locked      = locked;
            Revision    = revision;
            ServerId    = serverid;
            ViewMap     = viewmap;
            Spec        = spec;
#pragma warning disable 618
            Options = options;
#pragma warning restore 618
        }
Beispiel #2
0
 /// <summary>
 /// Parameterized constructor
 /// </summary>
 /// <param name="id">Perforce user name</param>
 /// <param name="fullname">User Full Name</param>
 /// <param name="password">password</param>
 /// <param name="emailaddress">email address</param>
 /// <param name="updated">last user update</param>
 /// <param name="accessed">last user access</param>
 /// <param name="jobview">Job View String</param>
 /// <param name="authmethod">Authentication Method</param>
 /// <param name="reviews">Review Specification</param>
 /// <param name="type">User type</param>
 /// <param name="spec">User form specificatoin</param>
 public User(string id,
             string fullname,
             string password,
             string emailaddress,
             DateTime updated,
             DateTime accessed,
             string jobview,
             string authmethod,
             List <string> reviews,
             UserType type,
             FormSpec spec
             )
 {
     Id           = id;
     FullName     = fullname;
     Password     = password;
     EmailAddress = emailaddress;
     Updated      = updated;
     Accessed     = accessed;
     JobView      = jobview;
     AuthMethod   = authmethod;
     Reviews      = reviews;
     Type         = type;
     Spec         = spec;
 }
Beispiel #3
0
 /// <summary>
 /// Parameterized Constructor - Creates typemap with one entry
 /// </summary>
 /// <param name="mapping">entry to store</param>
 /// <param name="spec">FormSpec to store</param>
 public TypeMap
 (
     TypeMapEntry mapping,
     FormSpec spec
 )
 {
     Mapping = mapping;
     Spec    = spec;
 }
Beispiel #4
0
 public TriggerTable
 (
     Trigger entry,
     FormSpec spec
 )
 {
     Entry = entry;
     Spec  = spec;
 }
Beispiel #5
0
        /// <summary>
        /// Return the SpecFieldDataType associated with a key in a formspec
        /// </summary>
        /// <param name="formspec">FormSpec to search</param>
        /// <param name="key">Key to query</param>
        /// <returns>The SpecFieldDataType enum</returns>
        public SpecFieldDataType GetSpecFieldDataType(FormSpec formspec, string key)
        {
            string line;

            formspec.FieldMap.TryGetValue(key, out line);

            if (line == null)
            {
                return(SpecFieldDataType.None);
            }
            string[] parts = line.Split(new char[] { ' ' }, 4);

            StringEnum <SpecFieldDataType> data = parts[2];

            return(data);
        }
Beispiel #6
0
        public Stream(
            string id,
            DateTime updated,
            DateTime accessed,
            string ownername,
            string name,
            PathSpec parent,
            PathSpec baseparent,
            StreamType type,
            string description,
            StreamOption options,
            string firmerthanparent,
            string changeflowstoparent,
            string changeflowsfromparent,
            ViewMap paths,
            ViewMap remapped,
            ViewMap ignored,
            ViewMap view,
            ViewMap changeview,
            FormSpec spec,
            Dictionary <string, object> customfields,
            ParentView parentview)

        {
            Id                    = id;
            Updated               = updated;
            Accessed              = accessed;
            OwnerName             = ownername;
            Name                  = name;
            Parent                = parent;
            BaseParent            = baseparent;
            Type                  = type;
            Description           = description;
            Options               = options;
            FirmerThanParent      = firmerthanparent;
            ChangeFlowsToParent   = changeflowstoparent;
            ChangeFlowsFromParent = changeflowsfromparent;
            Paths                 = paths;
            Remapped              = remapped;
            Ignored               = ignored;
            View                  = view;
            ChangeView            = changeview;
            Spec                  = spec;
            CustomFields          = customfields;
            ParentView            = parentview;
        }
Beispiel #7
0
 public Group(string id,
              int maxResults,
              int maxScanRows,
              int maxLockTime,
              int timeOut,
              int passwordTimeout,
              IList <string> ownerNames,
              IList <string> userNames,
              IList <string> subGroups,
              FormSpec spec)
 {
     Id              = id;
     MaxResults      = maxResults;
     MaxScanRows     = maxScanRows;
     MaxLockTime     = maxLockTime;
     TimeOut         = timeOut;
     PasswordTimeout = passwordTimeout;
     OwnerNames      = ownerNames;
     UserNames       = userNames;
     SubGroups       = subGroups;
     Spec            = spec;
 }
Beispiel #8
0
        /// <summary>
        /// A branch view specification in a Perforce repository.
        /// </summary>
        /// <param name="accessed">The date of the last command used with this spec.</param>
        /// <param name="description">A description of the branch spec (optional).</param>
        /// <param name="id">The branch spec name (read only).</param>
        /// <param name="locked">When true, permits only the owner to change the spec.</param>
        /// <param name="options">Flags to change the branch spec behavior.</param>
        /// <param name="owner">The user who created this branch spec.</param>
        /// <param name="spec">Specifies structural and semantic metadata for form types.</param>
        /// <param name="updated">The date this branch spec was last modified.</param>
        /// <param name="viewmap">Lines mapping of one view of depot files to another.</param>
        public BranchSpec(string id,
                          string owner,
                          DateTime updated,
                          DateTime accessed,
                          string description,
                          bool locked,
                          ViewMap viewmap,
                          FormSpec spec,
                          string options
                          )
        {
            Id          = id;
            Owner       = owner;
            Updated     = updated;
            Accessed    = accessed;
            Description = description;
            Locked      = locked;
            ViewMap     = viewmap;
            Spec        = spec;
#pragma warning disable 618
            Options = options;
#pragma warning restore 618
        }
Beispiel #9
0
 /// <summary>
 /// Detailed constructor
 /// </summary>
 /// <param name="id">depot name</param>
 /// <param name="type">depot type</param>
 /// <param name="modified">modified DateTime</param>
 /// <param name="address">server address</param>
 /// <param name="owner">string owner</param>
 /// <param name="description">description of depot</param>
 /// <param name="suffix">suffix field</param>
 /// <param name="map">map field</param>
 /// <param name="streamdepth">stream depth</param>
 /// <param name="spec">FormSpec</param>
 public Depot(string id,
              DepotType type,
              DateTime modified,
              ServerAddress address,
              string owner,
              string description,
              string suffix,
              string map,
              string streamdepth,
              FormSpec spec
              )
 {
     Id          = id;
     Type        = type;
     Modified    = modified;
     Address     = address;
     Owner       = owner;
     Description = description;
     Suffix      = suffix;
     Map         = map;
     StreamDepth = streamdepth;
     Spec        = spec;
 }
Beispiel #10
0
        /// <summary>
        /// Create a FormSpec from the tagged output of the 'spec' command
        /// </summary>
        /// <param name="obj">Tagged object returned by the 'spec' command</param>
        /// <returns></returns>
        public static FormSpec FromSpecCmdTaggedOutput(TaggedObject obj)
        {
            FormSpec val = new FormSpec();
            int      idx = 0;

            // Check for each property in the tagged data, and use it to set the
            // appropriate filed in the object

            string key = String.Format("Fields{0}", idx);

            while (obj.ContainsKey(key))
            {
                string fieldDef = obj[key];
                val.Fields.Add(SpecField.FromSpecCmdTaggedData(fieldDef));
                key = String.Format("Fields{0}", ++idx);
            }

            idx = 0;
            key = String.Format("Fields{0}", idx);
            while (obj.ContainsKey(key))
            {
                string   line  = obj[key];
                string[] parts = line.Split(new char[] { ' ' }, 3);
                val.FieldMap[parts[1]] = line;
                key = String.Format("Fields{0}", ++idx);
            }

            idx = 0;
            key = String.Format("Words{0}", idx);
            while (obj.ContainsKey(key))
            {
                string word = obj[key];
                val.Words.Add(word);
                key = String.Format("Words{0}", ++idx);
            }

            idx = 0;
            key = String.Format("Formats{0}", idx);
            while (obj.ContainsKey(key))
            {
                string word = obj[key];
                val.Formats.Add(word);
                key = String.Format("Formats{0}", ++idx);
            }

            idx = 0;
            key = String.Format("Values{0}", idx);
            while (obj.ContainsKey(key))
            {
                string   line  = obj[key];
                string[] parts = line.Split(new char[] { ' ' }, 2);
                val.Values[parts[0]] = parts[1];
                key = String.Format("Values{0}", ++idx);
            }

            idx = 0;
            key = String.Format("Presets{0}", idx);
            while (obj.ContainsKey(key))
            {
                string   line  = obj[key];
                string[] parts = line.Split(new char[] { ' ' }, 2);
                val.Presets[parts[0]] = parts[1];
                key = String.Format("Presets{0}", ++idx);
            }

            if (obj.ContainsKey("Comments"))
            {
                val.Comments = obj["Comments"];
            }

            return(val);
        }