Ejemplo n.º 1
0
        private SimpleHttpHandler(ContentState state)
        {
            _content = state;
            _handlers = new Dictionary<string, IRequestHandler[]>(StringComparer.OrdinalIgnoreCase);

            ContentRequestHandler content = new ContentRequestHandler(_content);
            SearchRequestHandler search = new SearchRequestHandler(_content);
            PingbackHandler pingback = new PingbackHandler(_content);
            PublishRequestHandler publish = new PublishRequestHandler(_content);

            _handlers.Add("HEAD", new IRequestHandler[] 
            {
                content,
                pingback,
            });
            _handlers.Add("GET", new IRequestHandler[] 
            {
                search, 
                content,
                pingback,
            });
            _handlers.Add("POST", new IRequestHandler[] 
            { 
                publish,
                pingback,
            });
        }
Ejemplo n.º 2
0
 public ContentRequestHandler(ContentState contentState)
 {
     _contentState = contentState;
 }
Ejemplo n.º 3
0
 public PingbackHandler(ContentState content)
 {
     _content = content;
     _filename = Path.Combine(_content.StoragePath, PingbackFile);
     _lockName = BitConverter.ToString(Hash.MD5(Encoding.UTF8.GetBytes(_filename)).ToArray());
 }
Ejemplo n.º 4
0
 public SearchRequestHandler(ContentState content)
 {
     _content = content;
 }
Ejemplo n.º 5
0
 public PublishRequestHandler(ContentState content)
 {
     _content = content;
 }
Ejemplo n.º 6
0
 public PingbackHandler(ContentState content)
 {
     _content  = content;
     _filename = Path.Combine(_content.StoragePath, PingbackFile);
     _lockName = BitConverter.ToString(Hash.MD5(Encoding.UTF8.GetBytes(_filename)).ToArray());
 }
Ejemplo n.º 7
0
 public ContentRequestHandler(ContentState contentState)
 {
     _contentState = contentState;
 }
Ejemplo n.º 8
0
 public SearchRequestHandler(ContentState content)
 {
     _content = content;
 }