This file contains 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 CheckBrowserAttribute : ActionFilterAttribute | |
{ | |
public override void OnActionExecuted(ActionExecutedContext filterContext) | |
{ | |
base.OnActionExecuted(filterContext); | |
} |
This file contains 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 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 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 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 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 : Add new user, disable, enable and remove Mikrotik user. | |
var variable = new Users("192.168.2.8", "admin", "password") |
This file contains 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 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
// Author: Oğuzhan YILMAZ | |
// Web : www.oguzhan.info | |
// Email : [email protected] | |
// 12/13/2011 | |
namespace PoshWhois | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.IO; |
This file contains 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 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; | |
} |
OlderNewer