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
| public class MethodResult | |
| { | |
| public bool Status { get; set; } | |
| public string Msg { get; set; } | |
| public string HowToResolve { 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
| Windows Registry Editor Version 5.00 | |
| [HKEY_CLASSES_ROOT\tyyp] | |
| @="URL:HyperText Transfer Protocol" | |
| "URL Protocol"="" | |
| [HKEY_CLASSES_ROOT\tyyp\DefaultIcon] | |
| @="C:\\Windows\\System32\\url.dll,0" | |
| [HKEY_CLASSES_ROOT\tyyp\shell] |
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.Web.Mvc; | |
| using System.Web.Routing; | |
| using MvcApplication1.Models; | |
| namespace MvcApplication1 | |
| { | |
| public class MvcApplication : System.Web.HttpApplication | |
| { | |
| public static void RegisterGlobalFilters(GlobalFilterCollection filters) | |
| { |
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.Web.Mvc; | |
| namespace MvcApplication1.Models | |
| { | |
| public class LoginRequiredAttribute : ActionFilterAttribute | |
| { | |
| public override void OnActionExecuting(ActionExecutingContext filterContext) | |
| { | |
| if (filterContext.HttpContext.Session["isLogIn"] == null) | |
| filterContext.Result = new RedirectResult("~/Home/Login"); |
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 Mikrotik.Api; | |
| namespace Usage | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var variable = new Firewall("192.168.2.8", "admin", "password") | |
| .Chain(Targets.forward) |
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 Mikrotik.Api; | |
| namespace Usage | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| //TODO : Create Mikrotik backup | |
| var variable = new RouterOs("192.168.2.8", "admin", "password") |
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 Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var cmd = new Executor(); | |
| dynamic commandItem = RemoteServer.GetCommandItemFromRemoteServer(); //return Object; | |
| cmd.ExecuteCommand(commandItem); | |
| Console.ReadKey(); |
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
| public void Before_1() | |
| { | |
| string Year = ""; | |
| string Month = ""; | |
| string Week = ""; | |
| string Day = ""; | |
| } |
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
| public void After_1() | |
| { | |
| string Year, Month, Week, Day = String.Empty; | |
| } |
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
| public bool SqlServerIsUp() | |
| { | |
| return Process.GetProcessesByName("sqlservr").Any(); | |
| } |
OlderNewer