コード例 #1
0
ファイル: WebFilesData.cs プロジェクト: Eric7Apps/BlogSource
        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;
              }
        }
コード例 #2
0
ファイル: WebFilesData.cs プロジェクト: Eric7Apps/BlogSource
        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 );
        }
コード例 #3
0
ファイル: WebFilesData.cs プロジェクト: Eric7Apps/BlogSource
        internal void SetRecord( string KeyWord, WebFilesRec Rec )
        {
            if( KeyWord == null )
              return;

            KeyWord = KeyWord.ToLower().Trim();
            if( KeyWord.Length < 4 )
              return;

            WebFilesDictionary[KeyWord] = Rec;
        }