protected override IEnumerable <ContentType> GetEntities(ESPContext entityContext)
        {
            var list = from contentType in entityContext.ContentTypeSet
                       select contentType;

            return(list.ToList());
        }
        public ESPEntityController(ESPContext context)
        {
            _context = context;

            udpService = new UdpRequestService();

            if (_context.ESPs.Count() == 0)
            {
                ESPEntity test = new ESPEntity();
                test.Id        = 1;
                test.IPAddress = "192.168.137.37";
                test.Name      = "Node_1";
                _context.Add(test);
                _context.SaveChanges();
            }
        }
Example #3
0
        /// <summary>
        /// 以索引属性的方式获取或设置上下文中存储的键值
        /// </summary>
        /// <value></value>
        public object this[string key]
        {
            get
            {
                if (Context != null)
                {
                    return(Context.GetItem(key));
                }
                else
                {
                    return(null);
                }
            }

            set
            {
                if (Context == null)
                {
                    Context = new ESPContext();
                }
                Context.SetItem(key, value);
            }
        }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RequestBase"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public RequestBase(ESPContext context)
     : base(context)
 {
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EaseDate"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public EaseDate(ESPContext context)
     : base(context)
 {
 }
Example #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PageV21Response"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public PageV21Response(ESPContext context)
     : base(context)
 {
 }
Example #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RequestHeader"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public RequestHeader(ESPContext context)
     : base(context)
 {
 }
Example #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NetworkSwitchRequest"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public NetworkSwitchRequest(ESPContext context)
     : base(context)
 {
 }
Example #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NetworkSwitchResponse"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public NetworkSwitchResponse(ESPContext context)
     : base(context)
 {
 }
Example #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PageRequest"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public PageRequest(ESPContext context)
     : base(context)
 {
 }
Example #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MixedResponse"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public MixedResponse(ESPContext context)
     : base(context)
 {
 }
 protected override ContentType UpdateEntity(ESPContext entityContext, ContentType entity)
 {
     return(entityContext.ContentTypeSet.Attach(entity));
 }
Example #13
0
 /// <summary>
 /// 初始化一个 <see cref="EaseString"/> class 实例。
 /// </summary>
 /// <param name="context">The context.</param>
 public EaseString(ESPContext context)
     : base(context)
 {
 }
Example #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResourceRequest"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public ResourceRequest(ESPContext context)
     : base(context)
 {
 }
Example #15
0
 /// <summary>
 /// 初始化一个 <see cref="ResourcePartialResponse"/>(资源分包响应) class 实例。
 /// </summary>
 /// <param name="context">The context.</param>
 public ResourcePartialResponse(ESPContext context)
     : base(context)
 {
 }
Example #16
0
 /// <summary>
 /// 初始化一个 <see cref="ResourcePackageResponse"/> class 实例。
 /// </summary>
 /// <param name="context">The context.</param>
 public ResourcePackageResponse(ESPContext context)
     : base(context)
 {
 }
Example #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IMG"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public IMG(ESPContext context)
     : base(context)
 {
 }
Example #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GatewayUpdateRequest"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public GatewayUpdateRequest(ESPContext context)
     : base(context)
 {
 }
Example #19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MixedRequest"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public MixedRequest(ESPContext context)
     : base(context)
 {
 }
Example #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PageResponse"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public PageResponse(ESPContext context)
     : base(context)
 {
     //internalImplementDataBind = true;
 }
Example #21
0
 public LYRIC(ESPContext context)
     : base(context)
 {
 }
 protected override ContentType GetEntity(ESPContext entityContext, string id)
 {
     throw new System.NotImplementedException();
 }
Example #23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GatewayUpdateResponse"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public GatewayUpdateResponse(ESPContext context)
     : base(context)
 {
 }
 protected override ContentType AddEntity(ESPContext entityContext, ContentType entity)
 {
     return(entityContext.ContentTypeSet.Add(entity));
 }
Example #25
0
 public SONG(ESPContext context)
     : base(context)
 {
 }
Example #26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResponseBase"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public ResponseBase(ESPContext context)
     : base(context)
 {
 }
Example #27
0
 public MUSIC(ESPContext context)
     : base(context)
 {
 }
Example #28
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApplicationPartialResponse"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public ApplicationPartialResponse(ESPContext context)
     : base(context)
 {
 }
Example #29
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CLUV"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public CLUV(ESPContext context)
     : base(context)
 {
 }
Example #30
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApplicationRequest"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public ApplicationRequest(ESPContext context)
     : base(context)
 {
 }