HasMagic() private méthode

private HasMagic ( ) : bool
Résultat bool
 /// <summary> Add the specified mime-type in the repository.</summary>
 /// <param name="type">is the mime-type to add.
 /// </param>
 internal void Add(MimeType type)
 {
     _typesIdx[type.Name] = type;
     _types.Add(type);
     // Update minLentgth
     _minLength = Math.Max(_minLength, type.MinLength);
     // Update the extensions index...
     String[] exts = type.Extensions;
     if (exts != null)
     {
         foreach (string ext in exts)
         {
             IList list = (IList)_extIdx[ext];
             if (list == null)
             {
                 // No type already registered for this extension...
                 // So, create a list of types
                 list         = new ArrayList();
                 _extIdx[ext] = list;
             }
             list.Add(type);
         }
     }
     // Update the magics index...
     if (type.HasMagic())
     {
         _mimeTypes.Add(type);
     }
 }
		/// <summary> Add the specified mime-type in the repository.</summary>
		/// <param name="type">is the mime-type to add.
		/// </param>
		internal void Add(MimeType type)
		{
			_typesIdx[type.Name] = type;
			_types.Add(type);
			// Update minLentgth
			_minLength = Math.Max(_minLength, type.MinLength);
			// Update the extensions index...
			String[] exts = type.Extensions;
			if (exts != null)
			{
				foreach (string ext in exts)
				{
					IList list = (IList) _extIdx[ext];
					if (list == null)
					{
						// No type already registered for this extension...
						// So, create a list of types
						list = new ArrayList();
						_extIdx[ext] = list;
					}
					list.Add(type);
				}
			}
			// Update the magics index...
			if (type.HasMagic())
			{
				_mimeTypes.Add(type);
			}
		}