/// <summary> /// Executes the PreS3RequestFilter event and returns the result. /// </summary> /// <param name="path"></param> /// <returns></returns> public string FilterPath(string path) { S3PathEventArgs e = new S3PathEventArgs(path); if (PreS3RequestFilter != null) { PreS3RequestFilter(this, e); } return(e.Path); }
public S3PathEventArgs ParseAndFilterPath(string virtualPath) { var path = StripPrefix(virtualPath); var e = new S3PathEventArgs(path); if (PreS3RequestFilter != null) { PreS3RequestFilter(this, e); } if (string.IsNullOrEmpty(e.Bucket)) { throw new ArgumentException("S3 path must specify a bucket" + e.Path); } if (string.IsNullOrEmpty(e.Key)) { throw new ArgumentException("S3 path must specify a key" + e.Path); } return(e); }
void S3Reader2_PreS3RequestFilter(S3Reader2 sender, S3PathEventArgs e) { e.AssertBucketMatches(AllowedBuckets); }
/// <summary> /// Execites the PreS3RequestFilter event and returns the result. /// </summary> /// <param name="path"></param> /// <returns></returns> public string FilterPath(string path) { S3PathEventArgs e = new S3PathEventArgs(path); if (PreS3RequestFilter != null) PreS3RequestFilter(this,e); return e.Path; }