1 /***************************************************************************
3 Copyright (c) Microsoft Corporation. All rights reserved.
4 THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
5 ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
6 IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
7 PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9 ***************************************************************************/
12 using System
.Collections
.Generic
;
14 using System
.Globalization
;
15 using Microsoft
.VisualStudio
.Shell
;
17 namespace Microsoft
.Samples
.VisualStudio
.SourceControlIntegration
.SccProvider
19 [AttributeUsage(AttributeTargets
.Class
, AllowMultiple
= true, Inherited
= true)]
20 internal sealed class ProvideSolutionProps
: RegistrationAttribute
22 private string _propName
;
24 public ProvideSolutionProps(string propName
)
29 public override void Register(RegistrationContext context
)
31 context
.Log
.WriteLine(string.Format(CultureInfo
.InvariantCulture
, "ProvideSolutionProps: ({0} = {1})", context
.ComponentType
.GUID
.ToString("B"), PropName
));
37 childKey
= context
.CreateKey(string.Format(CultureInfo
.InvariantCulture
, "{0}\\{1}", "SolutionPersistence", PropName
));
39 childKey
.SetValue(string.Empty
, context
.ComponentType
.GUID
.ToString("B"));
43 if (childKey
!= null) childKey
.Close();
47 public override void Unregister(RegistrationContext context
)
49 context
.RemoveKey(string.Format(CultureInfo
.InvariantCulture
, "{0}\\{1}", "SolutionPersistence", PropName
));
52 public string PropName { get { return _propName; }
}