예제 #1
0
        /// <summary>
        /// Deserializes
        /// </summary>
        public static SemanticPathInfo Deserialize(BuildXLReader reader)
        {
            Contract.Requires(reader != null);

            SemanticPathFlags info = (SemanticPathFlags)reader.ReadInt16();

            return(new SemanticPathInfo(
                       reader.ReadPathAtom(),
                       reader.ReadAbsolutePath(),
                       info));
        }
예제 #2
0
 /// <summary>
 /// Creates a new SemanticPathInfo
 /// </summary>
 public SemanticPathInfo(PathAtom rootName, AbsolutePath root, bool allowHashing, bool readable, bool writable, bool system = false, bool scrubbable = false, bool allowCreateDirectory = false)
 {
     RootName = rootName;
     Root     = root;
     Flags    = SemanticPathFlags.None |
                (allowHashing ? SemanticPathFlags.AllowHashing : SemanticPathFlags.None) |
                (readable ? SemanticPathFlags.Readable : SemanticPathFlags.None) |
                (writable ? SemanticPathFlags.Writable : SemanticPathFlags.None) |
                (system ? SemanticPathFlags.System : SemanticPathFlags.None) |
                (scrubbable ? SemanticPathFlags.Scrubbable : SemanticPathFlags.None) |
                (allowCreateDirectory ? SemanticPathFlags.AllowCreateDirectory : SemanticPathFlags.None);
 }
예제 #3
0
 /// <summary>
 /// Creates a new SemanticPathInfo
 /// </summary>
 public SemanticPathInfo(PathAtom rootName, AbsolutePath root, SemanticPathFlags flags)
 {
     RootName = rootName;
     Root     = root;
     Flags    = flags;
 }