コード例 #1
0
        /// <nodoc />
        public static FileEnvelopeId Deserialize(BinaryReader reader)
        {
            Contract.RequiresNotNull(reader);
            var value = reader.ReadString();

            if (!FileEnvelope.IsValidIdentifier(value))
            {
                throw new BuildXLException("Invalid id");
            }

            return(new FileEnvelopeId(value));
        }
コード例 #2
0
 /// <summary>
 /// Creates an instance
 /// </summary>
 public FileEnvelopeId(string id)
 {
     Contract.Requires(id == null || FileEnvelope.IsValidIdentifier(id));
     Value = id;
 }