IPFilter.Services.Deployment.UninstallInfo.GetPublicKeyToken C# (CSharp) Method

GetPublicKeyToken() public method

public GetPublicKeyToken ( ) : string
return string
        public string GetPublicKeyToken()
        {
            var token = UninstallString.Split(',')
                .First(s => s.Trim().StartsWith("PublicKeyToken=", StringComparison.Ordinal)).Substring(16);
            if (token.Length != 16) throw new ArgumentException();
            return token;
        }

Usage Example

コード例 #1
0
ファイル: Uninstaller.cs プロジェクト: DavidMoore/ipfilter
        public void Uninstall(UninstallInfo uninstallInfo)
        {
            var toRemove = FindComponentsToRemove(uninstallInfo.GetPublicKeyToken());

            Console.WriteLine("Components to remove:");
            toRemove.ForEach(Console.WriteLine);
            Console.WriteLine();

            var steps = new List<IUninstallStep>
                            {
                                new RemoveFiles(),
                                new RemoveStartMenuEntry(uninstallInfo),
                                new RemoveRegistryKeys(_registry, uninstallInfo),
                                new RemoveUninstallEntry(uninstallInfo)
                            };

            steps.ForEach(s => s.Prepare(toRemove));
            steps.ForEach(s => s.PrintDebugInformation());
            steps.ForEach(s => s.Execute());

            steps.ForEach(s => s.Dispose());
        }
All Usage Examples Of IPFilter.Services.Deployment.UninstallInfo::GetPublicKeyToken