public void Set <T>(GalleryParameterType <T> type, T value) { if (type.Available(value) == true) { var values = this.Values; lock (values) { values[type] = value; } } }
public bool Equals(GalleryParameterType <T> other) { if (other == null || other.GetType().Equals(this.GetType()) == false) { return(false); } if (Guid.Equals(this.Id, other.Id) == false) { return(false); } return(true); }
public T Get <T>(GalleryParameterType <T> type, T fallback) { var values = this.Values; lock (values) { if (values.TryGetValue(type, out var value) == true && value is T t) { return(t); } else { return(fallback); } } }