From 894eb6016150c2f5392c967d1256925413b86af7 Mon Sep 17 00:00:00 2001 From: antiduh Date: Tue, 1 Jul 2014 15:57:58 +0000 Subject: [PATCH] Moved the simple demo code to its own project so that the NSspi.csproj project could be a standard dll, and not a referenced exe assembly. --- NSspi.sln | 6 ++ NSspi/NSspi.csproj | 6 +- NsspiDemo/App.config | 6 ++ NsspiDemo/NsspiDemo.csproj | 83 +++++++++++++++ {NSspi => NsspiDemo}/Program.cs | 7 -- NsspiDemo/Properties/AssemblyInfo.cs | 36 +++++++ NsspiDemo/Properties/Resources.Designer.cs | 71 +++++++++++++ NsspiDemo/Properties/Resources.resx | 117 +++++++++++++++++++++ NsspiDemo/Properties/Settings.Designer.cs | 30 ++++++ NsspiDemo/Properties/Settings.settings | 7 ++ 10 files changed, 359 insertions(+), 10 deletions(-) create mode 100644 NsspiDemo/App.config create mode 100644 NsspiDemo/NsspiDemo.csproj rename {NSspi => NsspiDemo}/Program.cs (93%) create mode 100644 NsspiDemo/Properties/AssemblyInfo.cs create mode 100644 NsspiDemo/Properties/Resources.Designer.cs create mode 100644 NsspiDemo/Properties/Resources.resx create mode 100644 NsspiDemo/Properties/Settings.Designer.cs create mode 100644 NsspiDemo/Properties/Settings.settings diff --git a/NSspi.sln b/NSspi.sln index 5bb88e8..2f91202 100644 --- a/NSspi.sln +++ b/NSspi.sln @@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestServer", "TestServer\Te EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NSspi", "NSspi\NSspi.csproj", "{4B4CD933-BF62-4F92-B8FA-6771758C5197}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NsspiDemo", "NsspiDemo\NsspiDemo.csproj", "{43FD19B6-656A-4AA1-9D3B-40B3A0C94084}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -31,6 +33,10 @@ Global {4B4CD933-BF62-4F92-B8FA-6771758C5197}.Debug|Any CPU.Build.0 = Debug|Any CPU {4B4CD933-BF62-4F92-B8FA-6771758C5197}.Release|Any CPU.ActiveCfg = Release|Any CPU {4B4CD933-BF62-4F92-B8FA-6771758C5197}.Release|Any CPU.Build.0 = Release|Any CPU + {43FD19B6-656A-4AA1-9D3B-40B3A0C94084}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {43FD19B6-656A-4AA1-9D3B-40B3A0C94084}.Debug|Any CPU.Build.0 = Debug|Any CPU + {43FD19B6-656A-4AA1-9D3B-40B3A0C94084}.Release|Any CPU.ActiveCfg = Release|Any CPU + {43FD19B6-656A-4AA1-9D3B-40B3A0C94084}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/NSspi/NSspi.csproj b/NSspi/NSspi.csproj index b1e34bc..460ccfe 100644 --- a/NSspi/NSspi.csproj +++ b/NSspi/NSspi.csproj @@ -5,7 +5,7 @@ Debug AnyCPU {4B4CD933-BF62-4F92-B8FA-6771758C5197} - WinExe + Library Properties NSspi NSspi @@ -32,7 +32,8 @@ 4 - NSspi.Program + + @@ -70,7 +71,6 @@ - diff --git a/NsspiDemo/App.config b/NsspiDemo/App.config new file mode 100644 index 0000000..fad249e --- /dev/null +++ b/NsspiDemo/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/NsspiDemo/NsspiDemo.csproj b/NsspiDemo/NsspiDemo.csproj new file mode 100644 index 0000000..707b2a7 --- /dev/null +++ b/NsspiDemo/NsspiDemo.csproj @@ -0,0 +1,83 @@ + + + + + Debug + AnyCPU + {43FD19B6-656A-4AA1-9D3B-40B3A0C94084} + WinExe + Properties + NsspiDemo + NsspiDemo + v4.5 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {4b4cd933-bf62-4f92-b8fa-6771758c5197} + NSspi + + + + + \ No newline at end of file diff --git a/NSspi/Program.cs b/NsspiDemo/Program.cs similarity index 93% rename from NSspi/Program.cs rename to NsspiDemo/Program.cs index b7c61b0..159fa6b 100644 --- a/NSspi/Program.cs +++ b/NsspiDemo/Program.cs @@ -1,12 +1,5 @@ using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.Serialization; -using System.Security.Principal; using System.Text; -using System.Threading.Tasks; -using System.Xml.Serialization; using NSspi.Contexts; using NSspi.Credentials; diff --git a/NsspiDemo/Properties/AssemblyInfo.cs b/NsspiDemo/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..2110a7a --- /dev/null +++ b/NsspiDemo/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle( "NsspiDemo" )] +[assembly: AssemblyDescription( "" )] +[assembly: AssemblyConfiguration( "" )] +[assembly: AssemblyCompany( "Kevin Thompson" )] +[assembly: AssemblyProduct( "NsspiDemo" )] +[assembly: AssemblyCopyright( "Copyright © Kevin Thompson 2014" )] +[assembly: AssemblyTrademark( "" )] +[assembly: AssemblyCulture( "" )] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible( false )] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid( "c2e19a91-70ec-457a-9a62-2aaaf9ee68c7" )] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion( "1.0.0.0" )] +[assembly: AssemblyFileVersion( "1.0.0.0" )] diff --git a/NsspiDemo/Properties/Resources.Designer.cs b/NsspiDemo/Properties/Resources.Designer.cs new file mode 100644 index 0000000..a9f08fd --- /dev/null +++ b/NsspiDemo/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18444 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace NsspiDemo.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute( "System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0" )] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute( "Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode" )] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute( global::System.ComponentModel.EditorBrowsableState.Advanced )] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if( ( resourceMan == null ) ) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager( "NsspiDemo.Properties.Resources", typeof( Resources ).Assembly ); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute( global::System.ComponentModel.EditorBrowsableState.Advanced )] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/NsspiDemo/Properties/Resources.resx b/NsspiDemo/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/NsspiDemo/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/NsspiDemo/Properties/Settings.Designer.cs b/NsspiDemo/Properties/Settings.Designer.cs new file mode 100644 index 0000000..6a3e836 --- /dev/null +++ b/NsspiDemo/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18444 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace NsspiDemo.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute( "Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0" )] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ( (Settings)( global::System.Configuration.ApplicationSettingsBase.Synchronized( new Settings() ) ) ); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/NsspiDemo/Properties/Settings.settings b/NsspiDemo/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/NsspiDemo/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + +