コード例 #1
0
        /// <summary>
        /// Compare the given object with this search path instance. The objects are equal if they have the same key, isDefault, type, priority and sub folder.
        /// </summary>
        /// <param name="obj">The object that should be used for the comparison.</param>
        /// <returns>True if the objects are equal.</returns>
        public override bool Equals(object obj)
        {
            SearchPath other = obj as SearchPath;

            if (other == null)
            {
                return(false);
            }

            return(Key == other.Key && IsDefault == other.IsDefault && Type == other.Type && Priority == other.Priority && SubFolder == other.SubFolder);
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the EnvironmentModuleInfo class with the given parameters.
        /// </summary>
        /// <param name="moduleBase">The directory holding the module files (like .psm1, pse1, etc.).</param>
        /// <param name="moduleRoot">The root module that was identified holding the required items.</param>
        /// <param name="tmpDirectory">The tmp. directory that can be used to store session related files etc..</param>
        /// <param name="fullName">The full name of the module.</param>
        /// <param name="name">The short name of the module.</param>
        /// <param name="version">The version of the module.</param>
        /// <param name="architecture">The architecture of the module.</param>
        /// <param name="additionalOptions">Additional options specifying the module.</param>
        /// <param name="moduleType">The type of the module.</param>
        public EnvironmentModuleInfo(
            string moduleBase,
            string moduleRoot,
            string tmpDirectory,
            string fullName,
            string name,
            string version,
            string architecture,
            string additionalOptions,
            EnvironmentModuleType moduleType = EnvironmentModuleType.Default) : base(fullName, moduleBase, name, version, architecture, additionalOptions, moduleType)
        {
            ModuleRoot   = moduleRoot;
            TmpDirectory = tmpDirectory;

            Dependencies  = new DependencyInfo[0];
            SearchPaths   = new SearchPath[0];
            RequiredItems = new RequiredItem[0];

            DirectUnload = false;
            StyleVersion = 1.0;
            Category     = string.Empty;
            Parameters   = new Dictionary <string, string>();
        }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the SearchPath class by copying the values from the passed object.
 /// </summary>
 /// <param name="other">The object that is used as data source for the copy operation.</param>
 public SearchPath(SearchPath other) : this(other.Key, other.Type, other.Priority, other.SubFolder, other.IsDefault, other.IsTemporary, other.IsGlobal)
 {
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the SearchPathInfo class with the given parameters.
 /// </summary>
 /// <param name="baseSearchPath">The base parameter to use.</param>
 /// <param name="module">The module that uses the search path.</param>
 public SearchPathInfo(SearchPath baseSearchPath, string module) : base(baseSearchPath)
 {
     Module = module;
 }