SolutionExtensions.VSPackage.GetSolution C# (CSharp) Method

GetSolution() public static method

public static GetSolution ( ) : string
return string
        public static string GetSolution()
        {
            if (DTE.Solution == null)
                return null;

            return DTE.Solution.FullName;
        }

Usage Example

Example #1
0
        public static void IgnoreSolution(bool ignore)
        {
            WritableSettingsStore wstore = _settings.GetWritableSettingsStore(SettingsScope.UserSettings);

            if (!wstore.CollectionExists(Constants.VSIX_NAME))
            {
                wstore.CreateCollection(Constants.VSIX_NAME);
            }

            string solution = VSPackage.GetSolution();

            if (string.IsNullOrEmpty(solution))
            {
                return;
            }

            string property = GetPropertyName(solution);

            if (ignore)
            {
                wstore.SetInt32(Constants.VSIX_NAME, property, 1);
            }
            else
            {
                wstore.DeleteProperty(Constants.VSIX_NAME, property);
            }
        }
All Usage Examples Of SolutionExtensions.VSPackage::GetSolution