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();
            }
        }
예제 #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);
            }
        }
예제 #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)
 {
 }
예제 #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)
 {
 }
예제 #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)
 {
 }
예제 #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)
 {
 }
예제 #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)
 {
 }
예제 #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)
 {
 }
예제 #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)
 {
 }
예제 #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)
 {
 }
예제 #12
0
 protected override ContentType UpdateEntity(ESPContext entityContext, ContentType entity)
 {
     return(entityContext.ContentTypeSet.Attach(entity));
 }
예제 #13
0
 /// <summary>
 /// 初始化一个 <see cref="EaseString"/> class 实例。
 /// </summary>
 /// <param name="context">The context.</param>
 public EaseString(ESPContext context)
     : base(context)
 {
 }
예제 #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)
 {
 }
예제 #15
0
 /// <summary>
 /// 初始化一个 <see cref="ResourcePartialResponse"/>(资源分包响应) class 实例。
 /// </summary>
 /// <param name="context">The context.</param>
 public ResourcePartialResponse(ESPContext context)
     : base(context)
 {
 }
예제 #16
0
 /// <summary>
 /// 初始化一个 <see cref="ResourcePackageResponse"/> class 实例。
 /// </summary>
 /// <param name="context">The context.</param>
 public ResourcePackageResponse(ESPContext context)
     : base(context)
 {
 }
예제 #17
0
파일: IMG.cs 프로젝트: ridgew/DataSpec
 /// <summary>
 /// Initializes a new instance of the <see cref="IMG"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public IMG(ESPContext context)
     : base(context)
 {
 }
예제 #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)
 {
 }
예제 #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)
 {
 }
예제 #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;
 }
예제 #21
0
파일: LYRIC.cs 프로젝트: ridgew/DataSpec
 public LYRIC(ESPContext context)
     : base(context)
 {
 }
예제 #22
0
 protected override ContentType GetEntity(ESPContext entityContext, string id)
 {
     throw new System.NotImplementedException();
 }
예제 #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)
 {
 }
예제 #24
0
 protected override ContentType AddEntity(ESPContext entityContext, ContentType entity)
 {
     return(entityContext.ContentTypeSet.Add(entity));
 }
예제 #25
0
 public SONG(ESPContext context)
     : base(context)
 {
 }
예제 #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)
 {
 }
예제 #27
0
파일: MUSIC.cs 프로젝트: ridgew/DataSpec
 public MUSIC(ESPContext context)
     : base(context)
 {
 }
예제 #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)
 {
 }
예제 #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)
 {
 }
예제 #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)
 {
 }