示例#1
0
        public void Initialize()
        {
            CodeLines = new List <NuGenCodeLine>();

            NuGenCodeLine definition = new NuGenCodeLine(0, "file " + Name);

            CodeLines.Add(definition);

            CodeLines.Add(new NuGenCodeLine(0, string.Format(".hash = {0}", NuGenHelperFunctions.ReadBlobAsString(Hash, HashLength))));
        }
示例#2
0
        public void Initialize()
        {
            CodeLines = new List <NuGenCodeLine>();

            StringBuilder definition = new StringBuilder();

            definition.Append(".assembly extern ");
            definition.Append(NuGenHelperFunctions.EnumAsString(Flags, CorAssemblyFlags.afRetargetable, "retargetable "));
            definition.Append(Name);

            NuGenCodeLine definitionLine = new NuGenCodeLine(0, definition.ToString());

            CodeLines.Add(definitionLine);

            CodeLines.Add(new NuGenCodeLine(0, "{"));

            if (FullPath != null && FullPath.Length > 0)
            {
                CodeLines.Add(new NuGenCodeLine(1, "//Full Path: " + FullPath));
            }
            else
            {
                CodeLines.Add(new NuGenCodeLine(1, "//Full Path: exact location not found. "));
            }

            CodeLines.Add(new NuGenCodeLine(1, ".publickeytoken = " + NuGenHelperFunctions.ReadBlobAsString(PublicKeyOrToken, PublicKeyOrTokenLength)));

            if (HashBlobLength > 0)
            {
                CodeLines.Add(new NuGenCodeLine(1, ".hash = " + NuGenHelperFunctions.ReadBlobAsString(HashBlob, HashBlobLength)));
            }

            CodeLines.Add(new NuGenCodeLine(1, string.Format(".ver {0}:{1}:{2}:{3}", Metadata.usMajorVersion, Metadata.usMinorVersion, Metadata.usBuildNumber, Metadata.usRevisionNumber)));

            CodeLines.Add(new NuGenCodeLine(0, "} //end of assembly reference " + Name));
        }