private Type GetExtensionType(ContextInformation evaluationContext, string name) { ExtensionElementCollection elements = ExtensionsSection.UnsafeLookupCollection(this.extensionCollectionName, evaluationContext); if (!elements.ContainsKey(name)) { return(null); } ExtensionElement element = elements[name]; Type type = Type.GetType(element.Type, false); if (null == type) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(System.ServiceModel.SR.GetString("ConfigInvalidType", new object[] { element.Type, element.Name }), base.ElementInformation.Source, base.ElementInformation.LineNumber)); } return(type); }
Type GetExtensionType(ContextInformation evaluationContext, string name) { ExtensionElementCollection collection = ExtensionsSection.UnsafeLookupCollection(this.extensionCollectionName, evaluationContext); if (collection.ContainsKey(name)) { ExtensionElement element = collection[name]; Type elementType = Type.GetType(element.Type, false); if (null == elementType) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigInvalidType, element.Type, element.Name), this.ElementInformation.Source, this.ElementInformation.LineNumber)); } return(elementType); } return(null); }