public ITypeMetadata GetMetadata(Type type) { ITypeMetadata factory; if (!this.metadata.TryGetValue(type, out factory)) { TypeMetadataFactory.MetadataEntry metadata = this.factory.GetMetadata(type); factory = metadata.Factory(type); factory.TypeResolver = this.typeResolver; this.metadata.Add(type, factory); } return(factory); }
public void Reset() { this.factory = new TypeMetadataFactory.MetadataFactory(new Action(this.Initialize)); this.metadata = new Dictionary <Type, ITypeMetadata>(); }