public override IMediaFile NewMediaFile(IFile file, MediaFileNodeType mediaFileNodeType) { var lastException = new NotSupportedException(); foreach (MediaFileFactory factory in this.ComponentFactories) { try { return factory.NewMediaFile(file, mediaFileNodeType); } catch (NotSupportedException e) { lastException = e; } } throw lastException; }
public override IMediaFile NewMediaFile(IFile file, MediaFileNodeType mediaFileNodeType) { var lastException = new NotSupportedException(); foreach (MediaFileFactory factory in this.ComponentFactories) { try { return(factory.NewMediaFile(file, mediaFileNodeType)); } catch (NotSupportedException e) { lastException = e; } } throw lastException; }
/// <summary> /// Builds a new <see cref="IMediaFile"/> instance from the given file /// </summary> /// <param name="file">The underlying file for the <see cref="IMediaFile"/></param> /// <param name="mediaFileNodeType">The <see cref="MediaFileNodeType"/> for the <see cref="IMediaFile"/></param> /// <returns> /// An <see cref="IMediaFile"/> instnace /// </returns> /// <exception cref="NotSupportedException"> /// The given <see cref="MediaFileNodeType"/> is not supported /// </exception> public abstract IMediaFile NewMediaFile(IFile file, MediaFileNodeType mediaFileNodeType);
/// <summary> /// Builds a new <see cref="IMediaFile"/> instance from the given URI /// </summary> /// <param name="uri">The uri to the file</param> /// <param name="mediaFileNodeType">The <see cref="MediaFileNodeType"/> for the <see cref="IMediaFile"/></param> /// <returns> /// An <see cref="IMediaFile"/> instnace /// </returns> /// <exception cref="NotSupportedException"> /// The given <see cref="MediaFileNodeType"/> is not supported /// </exception> public virtual IMediaFile NewMediaFile(string uri, MediaFileNodeType mediaFileNodeType) { return(NewMediaFile(FileSystemManager.GetManager().ResolveFile(uri), mediaFileNodeType)); }
/// <summary> /// Builds a new <see cref="IMediaFile"/> instance from the given URI /// </summary> /// <param name="uri">The uri to the file</param> /// <param name="mediaFileNodeType">The <see cref="MediaFileNodeType"/> for the <see cref="IMediaFile"/></param> /// <returns> /// An <see cref="IMediaFile"/> instnace /// </returns> /// <exception cref="NotSupportedException"> /// The given <see cref="MediaFileNodeType"/> is not supported /// </exception> public virtual IMediaFile NewMediaFile(string uri, MediaFileNodeType mediaFileNodeType) { return NewMediaFile(FileSystemManager.GetManager().ResolveFile(uri), mediaFileNodeType); }