aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.WebClientGenerator/Properties/AssemblyInfo.cs
blob: e9745e48b9a2b8cd3a1809d28c1db60a31fb1f02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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("Tango.WebClientGenerator")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Tango.WebClientGenerator")]
[assembly: AssemblyCopyright("Copyright ©  2019")]
[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("e470673e-aec8-4555-9136-d2f66b02dbfb")]

// 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")]
n> get { return options; } } #endregion #region "static helpers" public static ConnectionOptions SetConnectionOptions() { ConnectionOptions options = new ConnectionOptions(); options.Impersonation = ImpersonationLevel.Impersonate; options.Authentication = AuthenticationLevel.Default; options.EnablePrivileges = true; return options; } public static ManagementScope SetConnectionScope(string machineName, ConnectionOptions options) { ManagementScope connectScope = new ManagementScope(); connectScope.Path = new ManagementPath(@"\\" + machineName + @"\root\CIMV2"); connectScope.Options = options; try { connectScope.Connect(); } catch (ManagementException e) { Console.WriteLine("An Error Occurred: " + e.Message.ToString()); } return connectScope; } #endregion #region "constructors" public Connection() { EstablishConnection(null, null, null, Environment.MachineName); } public Connection(string userName, string password, string domain, string machineName) { EstablishConnection(userName, password, domain, machineName); } #endregion #region "private helpers" private void EstablishConnection(string userName, string password, string domain, string machineName) { options = Connection.SetConnectionOptions(); if (domain != null || userName != null) { options.Username = domain + "\\" + userName; options.Password = password; } connectionScope = Connection.SetConnectionScope(machineName, options); } #endregion } }