Ignore:
Timestamp:
Jul 21, 2008, 2:34:12 PM (13 years ago)
Author:
dai
Message:

#183への対応。コンストラクタ、デストラクタが直接呼び出された場合はエラーとして扱うようにした。
(64bit版は後ほどコミットします)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/src/Classes/System/IO/FileStream.ab

    r552 r560  
    3131    offset As QWord 'オーバーラップドIO用
    3232
    33 Public
    34     /* コンストラクタ.NETと同じように実装は難しい、一先ず動くものを実装したが変更が必要だと思う */
    35     Sub FileStream(path As String, mode As FileMode, access As FileAccess, share As FileShare, options As FileOptions)
     33    Sub _Initialize(path As String, mode As FileMode, access As FileAccess, share As FileShare, options As FileOptions)
    3634        If ActiveBasic.IsNothing(path) Then
    3735            Throw New ArgumentNullException("path")
     
    7270        End If
    7371    End Sub
     72
     73Public
     74    /* コンストラクタ.NETと同じように実装は難しい、一先ず動くものを実装したが変更が必要だと思う */
     75    Sub FileStream(path As String, mode As FileMode, access As FileAccess, share As FileShare, options As FileOptions)
     76        _Initialize( path, mode, access, share, options )
     77    End Sub
    7478    Sub FileStream(path As String, mode As FileMode, access As FileAccess, share As FileShare)
    75         This.FileStream(path,mode,access,share,FileOptions.None)
     79        _Initialize(path,mode,access,share,FileOptions.None)
    7680    End Sub
    7781    Sub FileStream(path As String, mode As FileMode, access As FileAccess)
    78         This.FileStream(path,mode,access,FileShare.None,FileOptions.None)
     82        _Initialize(path,mode,access,FileShare.None,FileOptions.None)
    7983    End Sub
    8084    Sub FileStream(path As String, mode As FileMode)
     
    9498                access=FileAccess.Write
    9599        End Select
    96         This.FileStream(path,mode,access,FileShare.None,FileOptions.None)
     100        _Initialize(path,mode,access,FileShare.None,FileOptions.None)
    97101    End Sub
    98102    /*
Note: See TracChangeset for help on using the changeset viewer.