示例#1
0
        public override Cci.CompilerOptions GetCompilerOptions(Microsoft.VisualStudio.Package.ProjectOptions projectOptions)
        {
            Cci.CompilerOptions     options;
            SpecSharpProjectOptions specSharpOptions = projectOptions as SpecSharpProjectOptions;

            if (specSharpOptions != null)
            {
                options = specSharpOptions.GetCompilerOptions();
            }
            else
            {
                options = base.GetCompilerOptions(projectOptions);
            }
            if (this.BuildSite != null)
            {
                options.Site = new Microsoft.VisualStudio.IntegrationHelper.BuildSiteAdaptor(this.BuildSite);
            }
            return(options);
        }
示例#2
0
        public override ProjectOptions GetProjectOptions(XmlElement config)
        {
            ProjectOptions          result  = base.GetProjectOptions(config);
            SpecSharpProjectOptions options = result as SpecSharpProjectOptions;

            if (options != null && config != null)
            {
                options.ReferenceTypesAreNonNullByDefault = this.GetBoolAttr(config, "ReferenceTypesAreNonNullByDefault");
                options.RunProgramVerifier                = this.GetBoolAttr(config, "RunProgramVerifier");
                options.RunProgramVerifierWhileEditing    = this.GetBoolAttr(config, "RunProgramVerifierWhileEditing");
                options.ProgramVerifierCommandLineOptions = config.GetAttribute("ProgramVerifierCommandLineOptions");
                // begin change by drunje
                options.AllowPointersToManagedStructures = this.GetBoolAttr(config, "AllowPointersToManagedStructures");
                // end change by drunje
                options.CheckContractAccessibility = this.GetBoolAttr(config, "CheckContractAdmissibility");
                options.CheckPurity = this.GetBoolAttr(config, "CheckPurity");
            }
            else
            {
                Debug.Assert(false);
            }
            return(result);
        }