|
using System;
using System.Collections.Generic;
using System.IO.Compression;
using System.Linq;
using System.Reflection;
using System.Text;
namespace AssemblyLoader
{
internal class ZipAssemblyInfo
{
public string AssemblyFileName { get; private set; }
public ZipAssemblyInfo(string assemblyFileName, Assembly containingAssembly, string manifestResourceName,
ZipStorer.ZipFileEntry zipFileEntry)
{
if (string.IsNullOrWhiteSpace(assemblyFileName))
{
throw new ArgumentNullException("assemblyFileName", "Assembly file name is missing.");
}
if (string.IsNullOrWhiteSpace(manifestResourceName))
{
throw new ArgumentNullException("manifestResourceName", "Manifest Resource Name is missing.");
}
if (containingAssembly == null)
{
throw new ArgumentNullException("containingAssembly", "Containing assembly is missing.");
}
this.AssemblyFileName = assemblyFileName;
this.ContainingAssembly = containingAssembly;
this.ManifestResourceName = manifestResourceName;
this.ZipFileEntry = zipFileEntry;
}
public Assembly ContainingAssembly { get; private set; }
public string ManifestResourceName { get; private set; }
public ZipStorer.ZipFileEntry ZipFileEntry { get; private set; }
public override string ToString()
{
return "AssemblyFileName = " + this.AssemblyFileName + Environment.NewLine
+ "ContainingAssembly = " + this.ContainingAssembly.FullName + Environment.NewLine
+ "ManifestResourceName = " + this.ManifestResourceName + Environment.NewLine
+ "FileCrc32 = " + this.ZipFileEntry.Crc32.ToString();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.