public Icon (Assembly asm, string resourceName) : base(Generator.Current, typeof(IIcon)) { inner = (IIcon)Handler; if (asm == null) asm = Assembly.GetCallingAssembly (); using (var stream = asm.GetManifestResourceStream (resourceName)) { if (stream == null) throw new ResourceNotFoundException (asm, resourceName); inner.Create (stream); } }
public Icon(Assembly asm, string resourceName) : base(Generator.Current, typeof(IIcon)) { handler = (IIcon)Handler; if (asm == null) { asm = Assembly.GetCallingAssembly(); } using (var stream = asm.GetManifestResourceStream(resourceName)) { if (stream == null) { throw new ResourceNotFoundException(asm, resourceName); } handler.Create(stream); } }
public Icon (string fileName) : base(Generator.Current, typeof(IIcon)) { inner = (IIcon)Handler; inner.Create (fileName); }
public Icon (Stream stream) : base(Generator.Current, typeof(IIcon)) { inner = (IIcon)Handler; inner.Create (stream); }
/// <summary> /// Intitializes a new instanc of the Icon class with the contents of the specified <paramref name="fileName"/> /// </summary> /// <param name="fileName">Name of the file to loat the content from</param> public Icon(string fileName) : base(Generator.Current, typeof(IIcon)) { handler = (IIcon)Handler; handler.Create(fileName); }
/// <summary> /// Initializes a new instance of the Icon class with the contents of the specified <paramref name="stream"/> /// </summary> /// <param name="stream">Stream to load the content from</param> public Icon(Stream stream) : base(Generator.Current, typeof(IIcon)) { handler = (IIcon)Handler; handler.Create(stream); }