OnPut() public method

public OnPut ( string path ) : IHttpResourceHandler
path string
return IHttpResourceHandler
コード例 #1
0
ファイル: Form1.cs プロジェクト: killbug2004/WSProf
        public Form1()
        {
            InitializeComponent();

            _context = SynchronizationContext.Current;

            string entropy = "?|2^&(*$:@!!*";

            _oldUrl = OptionApi.GetString("SendLinkServiceUrl");//, _oldUrl);
            _oldDeviceToken = OptionApi.GetEncrypted("SendLinkDeviceToken", entropy);
            _oldLogin = OptionApi.GetString("SendLinkCloudStorageLoginName"); //, _oldLogin);

            _server = new Server(Constants.Port);
            _server.OnPost("/sign_ups.xml").Respond(OnRespond);
            _server.OnPost("/user_sessions.xml").Respond(OnRespond);
            _server.OnGet("/current_user.xml").Respond(OnRespond);
            _server.OnPost("/folders.xml").Respond(OnRespond);
            _server.OnPost(string.Format("/folders/{0}/members.xml", Constants.FolderId)).Respond(OnRespond);
            _server.OnPut(string.Format("/folders/{0}/permission.xml", Constants.FolderId)).Respond(OnRespond);
            _server.OnPut(string.Format("/folders/{0}.xml", Constants.FolderId)).Respond(OnRespond);

            _server.OnPost("/file_versions.xml").Respond(OnRespond);
            _server.OnPost("/aws").Respond(OnRespond);
            _server.OnPut(string.Format("/file_versions/{0}.xml", Constants.FileId)).Respond(OnRespond);
            _server.OnGet(string.Format("/files/{0}.xml", Constants.AnotherFileId)).Respond(OnRespond);
            _server.OnPost("/validations/current_user/resend.xml").Respond(OnRespond);
        }
コード例 #2
0
 public UnitTestSkyDoxServer(int port)
 {
     _server = new Server(port);
     _server.OnPost("/sign_ups.xml").Respond(OnPostSignUps);
     _server.OnPost("/user_sessions.xml").Respond(OnPostUserSessions);
     _server.OnGet("/current_user.xml").Respond(OnGetCurrentUser);
     _server.OnPost("/folders.xml").Respond(OnPostFolders);
     _server.OnPost(string.Format("/folders/{0}/members.xml", _folderId)).Respond(OnPostMembers);
     _server.OnPut(string.Format("/folders/{0}/permission.xml", _folderId)).Respond(OnPutPermissions);
     _server.OnPut(string.Format("/folders/{0}.xml", _folderId)).Respond(OnPutFolder);
     _server.OnPost("/validations/resend.xml").Respond(OnValidations);
     NextResponse = new Queue<MockResponse>();
     Requests = new List<RequestPair>();
 }
コード例 #3
0
ファイル: MockServer.cs プロジェクト: killbug2004/WSProf
        public MockServer(int port)
        {
            _server = new Server(port);
            _server.OnPost("/sign_ups.xml").Respond(OnRespond);
            _server.OnPost("/user_sessions.xml").Respond(OnRespond);
            _server.OnGet("/current_user.xml").Respond(OnRespond);
            _server.OnPost("/folders.xml").Respond(OnRespond);
            _server.OnPost(string.Format("/folders/{0}/members.xml", Constants.FolderId)).Respond(OnRespond);
            _server.OnPut(string.Format("/folders/{0}/permission.xml", Constants.FolderId)).Respond(OnRespond);
            _server.OnPut(string.Format("/folders/{0}.xml", Constants.FolderId)).Respond(OnRespond);

            _server.OnPost("/file_versions.xml").Respond(OnRespond);
            _server.OnPost("/aws").Respond(OnRespond);
            _server.OnPut(string.Format("/file_versions/{0}.xml", Constants.FileId)).Respond(OnRespond);
            _server.OnGet(string.Format("/files/{0}.xml", Constants.AnotherFileId)).Respond(OnRespond);
            _server.OnPost("/validations/current_user/resend.xml").Respond(OnRespond);
        }