internal WebFilesRec GetRecord( string KeyWord ) { KeyWord = KeyWord.ToLower().Trim(); WebFilesRec Value = new WebFilesRec(); if( WebFilesDictionary.TryGetValue( KeyWord, out Value )) { return Value; } else { Value.FileBuffer = null; return Value; } }
internal bool UpdateRecordBuffer( string KeyWord, byte[] Buffer ) { if( KeyWord == null ) return false; KeyWord = KeyWord.Trim().ToLower(); if( KeyWord.Length < 4 ) return false; WebFilesRec Rec = new WebFilesRec(); Rec.FileBuffer = Buffer; SetRecord( KeyWord, Rec ); return WriteBufferToFile( KeyWord ); }
internal void SetRecord( string KeyWord, WebFilesRec Rec ) { if( KeyWord == null ) return; KeyWord = KeyWord.ToLower().Trim(); if( KeyWord.Length < 4 ) return; WebFilesDictionary[KeyWord] = Rec; }