コード例 #1
0
ファイル: BuildContext.cs プロジェクト: paulushub/SandAssists
        public void AddOutput(BuildFormatType formatType, string outputFile)
        {
            BuildExceptions.PathMustExist(outputFile, "outputFile");

            if (_buildOutputs == null)
            {
                _buildOutputs = new List <BuildTuple <BuildFormatType, string> >();
            }

            _buildOutputs.Add(BuildTuple.Create(formatType, outputFile));
        }
コード例 #2
0
        public BuildSpecialSdk(BuildSpecialSdkType sdkType, Version version,
                               string assemblyDir, string commentDir)
        {
            BuildExceptions.NotNull(version, "version");
            BuildExceptions.PathMustExist(assemblyDir, "assemblyDir");
            BuildExceptions.PathMustExist(commentDir, "commentDir");

            _version        = version;
            _assemblyDir    = assemblyDir;
            _commentDir     = commentDir;
            _specialSdkType = sdkType;
        }
コード例 #3
0
        public virtual void Initialize(string basePath)
        {
            BuildExceptions.PathMustExist(basePath, "basePath");

            _basePath = basePath;
            // Check the required condition, which works for all cases...
            if (!_basePath.EndsWith("\\"))
            {
                _basePath += "\\";
            }

            _isInitialized = true;
        }
コード例 #4
0
            public SystemCredentialProvider(string directory)
            {
                BuildExceptions.PathMustExist(directory, "directory");

                _credentialSource = Path.Combine(directory, SourceFile);
            }
コード例 #5
0
        public static BuildCredentialProvider Create(string directory)
        {
            BuildExceptions.PathMustExist(directory, "directory");

            return(new SystemCredentialProvider(directory));
        }
コード例 #6
0
        public virtual void Initialize(string name, string workingDir,
                                       bool isEditable)
        {
            BuildExceptions.NotNullNotEmpty(name, "name");
            BuildExceptions.PathMustExist(workingDir, "workingDir");

            if (_isInitialized)
            {
                return;
            }

            _name       = name;
            _workingDir = workingDir;
            _isEditable = isEditable;

            if (String.IsNullOrEmpty(_mediaDir))
            {
                _mediaDir = Path.Combine(workingDir, "Media");
            }
            if (String.IsNullOrEmpty(_mediaFile))
            {
                _mediaFile = Path.Combine(workingDir,
                                          _name + BuildFileExts.MediaContentExt);
            }

            if (String.IsNullOrEmpty(_topicsDir))
            {
                _topicsDir = Path.Combine(workingDir, "Topics");
                if (String.IsNullOrEmpty(_topicsCompanionDir))
                {
                    _topicsCompanionDir = _topicsDir;
                }
            }
            if (String.IsNullOrEmpty(_topicsCompanionDir))
            {
                _topicsCompanionDir = Path.Combine(workingDir, "Topics");
            }
            if (String.IsNullOrEmpty(_topicsFile))
            {
                _topicsFile = Path.Combine(workingDir,
                                           _name + BuildFileExts.ConceptualContentExt);
            }

            if (String.IsNullOrEmpty(_commentsDir))
            {
                _commentsDir = Path.Combine(workingDir, "Comments");
            }
            if (String.IsNullOrEmpty(_assembliesDir))
            {
                _assembliesDir = Path.Combine(workingDir, "References");
            }
            if (String.IsNullOrEmpty(_dependenciesDir))
            {
                _dependenciesDir = Path.Combine(workingDir, "Dependencies");
            }
            if (String.IsNullOrEmpty(_imagesDir))
            {
                _imagesDir = Path.Combine(workingDir, "Images");
            }

            _isInitialized = true;
        }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BuildConverter"/> class with
 /// the specified source and destination project and/or content file paths.
 /// </summary>
 /// <param name="sourceFile">
 /// A <see cref="System.String"/> specifying the path of the source project
 /// and/or content file.
 /// </param>
 /// <param name="destinationFile">
 /// A <see cref="System.String"/> specifying the path of the destination project
 /// and/or content file.
 /// </param>
 protected BuildConverter(string sourceFile, string destinationFile)
 {
     BuildExceptions.PathMustExist(sourceFile, "sourceFile");
     BuildExceptions.PathMustExist(destinationFile, "destinationFile");
 }