internal override void SetPreservedAttributes(PreservationFileWriter pfw)
 {
     base.SetPreservedAttributes(pfw);
     string preservationFileName = this.GetPreservationFileName();
     pfw.SetAttribute("CCUpreservationFileName", preservationFileName);
     using (FileStream stream = File.Open(Path.Combine(HttpRuntime.CodegenDirInternal, preservationFileName), FileMode.Create))
     {
         BinaryFormatter formatter = new BinaryFormatter();
         if (this._codeCompileUnit != null)
         {
             formatter.Serialize(stream, this._codeCompileUnit);
         }
         else
         {
             formatter.Serialize(stream, new object());
         }
         formatter.Serialize(stream, this._codeDomProviderType);
         formatter.Serialize(stream, this._compilerParameters);
         if (this._linePragmasTable != null)
         {
             formatter.Serialize(stream, this._linePragmasTable);
         }
         else
         {
             formatter.Serialize(stream, new object());
         }
     }
 }
コード例 #2
0
        internal override void SetPreservedAttributes(PreservationFileWriter pfw)
        {
            base.SetPreservedAttributes(pfw);
            string preservationFileName = this.GetPreservationFileName();

            pfw.SetAttribute("CCUpreservationFileName", preservationFileName);
            using (FileStream stream = File.Open(Path.Combine(HttpRuntime.CodegenDirInternal, preservationFileName), FileMode.Create))
            {
                BinaryFormatter formatter = new BinaryFormatter();
                if (this._codeCompileUnit != null)
                {
                    formatter.Serialize(stream, this._codeCompileUnit);
                }
                else
                {
                    formatter.Serialize(stream, new object());
                }
                formatter.Serialize(stream, this._codeDomProviderType);
                formatter.Serialize(stream, this._compilerParameters);
                if (this._linePragmasTable != null)
                {
                    formatter.Serialize(stream, this._linePragmasTable);
                }
                else
                {
                    formatter.Serialize(stream, new object());
                }
            }
        }
コード例 #3
0
 internal virtual void SetPreservedAttributes(PreservationFileWriter pfw)
 {
     if (this.Flags != 0)
     {
         pfw.SetAttribute("flags", this.Flags.ToString("x", CultureInfo.InvariantCulture));
     }
 }
 internal override void SetPreservedAttributes(PreservationFileWriter pfw)
 {
     base.SetPreservedAttributes(pfw);
     if (this._appInitializeMethod != null)
     {
         pfw.SetAttribute("appInitializeClass", this._appInitializeMethod.ReflectedType.FullName);
     }
 }
 internal override void SetPreservedAttributes(PreservationFileWriter pfw)
 {
     base.SetPreservedAttributes(pfw);
     if (this._appInitializeMethod != null)
     {
         pfw.SetAttribute("appInitializeClass", this._appInitializeMethod.ReflectedType.FullName);
     }
 }
コード例 #6
0
 internal override void SetPreservedAttributes(PreservationFileWriter pfw)
 {
     base.SetPreservedAttributes(pfw);
     if (this.HasResultAssembly)
     {
         string fullName;
         if (this.IsGacAssembly)
         {
             fullName = this.ResultAssembly.FullName;
         }
         else
         {
             fullName = this.ShortAssemblyName;
         }
         pfw.SetAttribute("assembly", fullName);
     }
 }
 internal override void SetPreservedAttributes(PreservationFileWriter pfw)
 {
     base.SetPreservedAttributes(pfw);
     pfw.SetAttribute("resHash", this.ResourcesDependenciesHash);
 }
 internal override void SetPreservedAttributes(PreservationFileWriter pfw)
 {
     base.SetPreservedAttributes(pfw);
     if (this.HasResultAssembly)
     {
         string fullName;
         if (this.IsGacAssembly)
         {
             fullName = this.ResultAssembly.FullName;
         }
         else
         {
             fullName = this.ShortAssemblyName;
         }
         pfw.SetAttribute("assembly", fullName);
     }
 }
コード例 #9
0
 internal override void SetPreservedAttributes(PreservationFileWriter pfw) {
     base.SetPreservedAttributes(pfw);
     pfw.SetAttribute("type", FullResultTypeName);
 }
コード例 #10
0
    internal override void SetPreservedAttributes(PreservationFileWriter pfw) {
        base.SetPreservedAttributes(pfw);

        pfw.SetAttribute("resHash", ResourcesDependenciesHash);
    }
コード例 #11
0
    internal override void SetPreservedAttributes(PreservationFileWriter pfw) {

        base.SetPreservedAttributes(pfw);

        // If there is an AppInitialize method, save the class name that it's in
        if (_appInitializeMethod != null) {
            pfw.SetAttribute("appInitializeClass", _appInitializeMethod.ReflectedType.FullName);
        }
    }
コード例 #12
0
    internal override void SetPreservedAttributes(PreservationFileWriter pfw) {
        base.SetPreservedAttributes(pfw);

        if (HasResultAssembly) {
            string assemblyName;
            if (IsGacAssembly) {
                // If it's in the GAC, store the full name (VSWhidbey 384416)
                assemblyName = ResultAssembly.FullName;
            }
            else {
                // Otherwise, store the short name, to avoid uselessly growing the preservation file
                assemblyName = ShortAssemblyName;
            }
            pfw.SetAttribute("assembly", assemblyName);
        }
    }
コード例 #13
0
    internal override void SetPreservedAttributes(PreservationFileWriter pfw) {
        base.SetPreservedAttributes(pfw);

        // Preserve the custom string
        pfw.SetAttribute("customString", _customString);
    }
コード例 #14
0
 internal virtual void SetPreservedAttributes(PreservationFileWriter pfw) {
     if (Flags != 0) {
         pfw.SetAttribute("flags", Flags.ToString("x", CultureInfo.InvariantCulture));
     }
 }
コード例 #15
0
 internal override void SetPreservedAttributes(PreservationFileWriter pfw)
 {
     base.SetPreservedAttributes(pfw);
     pfw.SetAttribute("customString", this._customString);
 }
コード例 #16
0
 internal override void SetPreservedAttributes(PreservationFileWriter pfw)
 {
     base.SetPreservedAttributes(pfw);
     pfw.SetAttribute("type", this.FullResultTypeName);
 }