public MongoCRUDOps(IDatabaseSettings databaseSettings, IUploadData uploadData) { _databaseSettings = databaseSettings ?? throw new ArgumentNullException(nameof(databaseSettings)); client = EstablishClient(); _uploadData = uploadData; }
public static SendUploadDataResponse OnSendUploadData(SendUploadDataParameters parameters) { if ("POST" == parameters.UrlRequest.Method) { IUploadData uploadData = parameters.UploadData; TextData textData = uploadData as TextData; if (textData != null) { Console.WriteLine($"Text data intercepted: {textData.Data}"); return(SendUploadDataResponse .Override(new FormData(new ReadOnlyCollection <KeyValuePair <string, string> > (new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("fname", "MyName"), new KeyValuePair <string, string>("lname", "MyLastName") })))); } } return(SendUploadDataResponse.Continue()); }