예제 #1
0
        /// <summary>
        /// Sets the metadata for a given annotation schema value.
        /// </summary>
        /// <param name="value">The schema value for which to set the metadata.</param>
        /// <param name="metadata">The metadata to associate with the value.</param>
        public void SetMetadata(T value, AnnotationSchemaValueMetadata metadata)
        {
            FiniteAnnotationSchemaValue <T> schemaValue = this.SchemaValues.First(v => v.Value.Equals(value));

            schemaValue.Metadata = metadata;
        }
예제 #2
0
        /// <inheritdoc />
        public override AnnotationSchemaValueMetadata GetMetadata(T value)
        {
            FiniteAnnotationSchemaValue <T> schemaValue = this.SchemaValues.FirstOrDefault(v => v.Value.Equals(value));

            return(schemaValue != null && schemaValue.Metadata != null ? schemaValue.Metadata : this.Metadata);
        }