C#之扩展方法
2021-02-05 00:15
标签:convert ace ssi get 对象 tst 转换 sof net C#之扩展方法 标签:convert ace ssi get 对象 tst 转换 sof net 原文地址:https://www.cnblogs.com/enych/p/11447276.htmlusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using BFWebManage.Helper;
namespace test_20190902
{
class Program
{
static void Main(string[] args)
{
}
void fun1(ActionExecutingContext filterContext)
{
filterContext.HttpContext.Session.Getint>("UserInfo");
}
}
public class ActionExecutingContext
{
public HttpContext HttpContext { get; set; }
}
//抽象类 //abstract
public class HttpContext
{
public ISession Session { get; set; }
}
}
namespace BFWebManage.Helper
{
//属性 扩展类 (属性名+Extensions的静态类)
public static class SessionExtensions
{
public static T Get