This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var _dte = ServiceProvider.GlobalProvider.GetService(typeof(EnvDTE.DTE)) as EnvDTE.DTE; | |
| Array _projects = DTE.ActiveSolutionProjects as Array; | |
| if ( _projects.Length != 0 && _projects != null) | |
| { | |
| Project _selectedProject = _projects.GetValue(0) as Project; | |
| //get the project path | |
| string _directoryPath = new FileInfo(_selectedProject.FullName).DirectoryName; | |
| Console.WriteLine(_selectedProject.FullName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-ChildItem | ForEach-Object { write-host $_.name } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for file in * | |
| do | |
| updatedFileName=`echo "$file" | awk '{print tolower($0)}' | sed s/' '/'-'/g` | |
| echo "$updatedFileName" | |
| mv "$file" "$updatedFileName" | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| //Citrix Netscaler nitro namespaces | |
| using com.citrix.netscaler.nitro.service; | |
| using com.citrix.netscaler.nitro.resource.config.lb; | |
| namespace NetscalerSDKShowcase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private bool CreateDatabaseWithDelete() | |
| { | |
| internal const string ConnectionString = "mongodb://localhost"; | |
| try | |
| { | |
| MongoClient Client = new MongoClient(ConnectionString); | |
| MongoServer Server = Client.GetServer(); | |
| if (Server.DatabaseExists("mydatabase")) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Customer | |
| { | |
| public string Id { get;set;} | |
| public string Name { get;set;} | |
| public List<Order> Orders | |
| } | |
| class Order | |
| { | |
| public string Id {get;set;} | |
| public string Name { get;set;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using com.citrix.netscaler.nitro.service; | |
| private List<string> GetGateways() | |
| { | |
| List<string> _accessGateways = new List<string>(); | |
| nitro_service _ns = new nitro_service(@"[Your Netscaler IP]", "http"); | |
| _ns.login("[Username]", "[Your Password]"); | |
| foreach (var _gateway in com.citrix.netscaler.nitro.resource.config.vpn.vpnvserver.get(_ns)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using com.citrix.netscaler.nitro.service; | |
| private List<string> GetGateways() | |
| { | |
| List<string> _accessGateways = new List<string>(); | |
| nitro_service _ns = new nitro_service(@"[Your Netscaler IP]", "http"); | |
| _ns.login("[Username]", "[Your Password]"); | |
| foreach (var _gateway in com.citrix.netscaler.nitro.resource.config.vpn.vpnvserver.get(_ns)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //build the XenServer session object that will hold a validated/authenticated | |
| //session to the specified xenserver | |
| XenAPI.Session _session = new XenAPI.Session("server address", 80); | |
| try | |
| { | |
| //try to login to the specified xenserver with the | |
| //supplied credentials | |
| _session.login_with_password("Username", "Password"); | |
| if (_session != null) | |
| { |
NewerOlder