public MqChunkAttribute Attribute(string name, bool createIfNotFound = true) { var value = this.Attributes.FirstOrDefault(_ => _.Name.Equals(name, StringComparison.CurrentCulture)); if (createIfNotFound && value == null) { this.Attributes.Add(value = new MqChunkAttribute { Name = name, }); } return(value); }
public MqChunkAttribute Attribute(string name, bool createIfNotFound = true) { var value = this.Attributes.FirstOrDefault(_ => _.Name.Equals(name, StringComparison.CurrentCulture)); if (createIfNotFound && value == null) this.Attributes.Add(value = new MqChunkAttribute { Name = name, }); return value; }