public static FCP2Key Create(string key) { FCP2Key resultKey = null; switch (key.Substring(0, 4)) { case ContentHashKey.KeyPrefix: resultKey = new ContentHashKey(key); break; case UpdateableSubspaceKey.KeyPrefix: resultKey = new UpdateableSubspaceKey(key); break; case KeywordSignedKey.KeyPrefix: resultKey = new KeywordSignedKey(key); break; case SignedSubspaceKey.KeyPrefix: resultKey = new SignedSubspaceKey(key); break; } return(resultKey != null && resultKey.Valid ? resultKey : null); }
public FCP2Upload Upload(FCP2Key key, FileInfo file) { return(new FCP2Upload()); }
//private long _currentBlocks; //private long _totalBlocks; internal FCP2Download(FCP2Key key, FileInfo file) { Key = key; File = file; }
public FCP2Download Download(FCP2Key key) { return(new FCP2Download(key, null)); }