/// <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)); }
/// <summary> /// Creates an instance /// </summary> public FileEnvelopeId(string id) { Contract.Requires(id == null || FileEnvelope.IsValidIdentifier(id)); Value = id; }