Beispiel #1
0
        /// <summary>Gets a file extension mappings</summary>
        /// <returns></returns>
        private FileExtensionMappingCollection GetFileExtensionMappings()
        {
            FileExtensionMappingCollection mappingCollection = new FileExtensionMappingCollection();

            foreach (FileExtensionRegistration fileExtension in (ConfigurationElementCollection)this._assetConfig.FileExtensions)
            {
                mappingCollection.Add(fileExtension.FileExtension, fileExtension.AssetTypeCode);
            }
            return(mappingCollection);
        }
        /// <summary>
        /// Gets a file extension mappings
        /// </summary>
        /// <returns></returns>
        private FileExtensionMappingCollection GetFileExtensionMappings()
        {
            var fileExtensionMappings = new FileExtensionMappingCollection();
            FileExtensionRegistrationCollection fileExtensionRegistrations = _assetConfig.FileExtensions;

            foreach (FileExtensionRegistration fileExtensionRegistration in fileExtensionRegistrations)
            {
                fileExtensionMappings.Add(
                    fileExtensionRegistration.FileExtension,
                    fileExtensionRegistration.AssetTypeCode);
            }

            return(fileExtensionMappings);
        }