function renames and make doublerange object can be save as xml doc
This commit is contained in:
parent
b2516ef2be
commit
fdbd84f132
|
|
@ -223,7 +223,7 @@ Namespace CommandLine
|
|||
Wait:=True
|
||||
)
|
||||
#End If
|
||||
Call path.Delete
|
||||
Call path.DeleteFile
|
||||
|
||||
Return exitCode
|
||||
End Function
|
||||
|
|
|
|||
|
|
@ -1,47 +1,47 @@
|
|||
#Region "Microsoft.VisualBasic::5129b125d626e728e29e3e3caeeccf56, Microsoft.VisualBasic.Core\ComponentModel\Ranges\RangeModel\DoubleRange.vb"
|
||||
|
||||
' Author:
|
||||
'
|
||||
' asuka (amethyst.asuka@gcmodeller.org)
|
||||
' xie (genetics@smrucc.org)
|
||||
' xieguigang (xie.guigang@live.com)
|
||||
'
|
||||
' Copyright (c) 2018 GPL3 Licensed
|
||||
'
|
||||
'
|
||||
' GNU GENERAL PUBLIC LICENSE (GPL3)
|
||||
'
|
||||
'
|
||||
' This program is free software: you can redistribute it and/or modify
|
||||
' it under the terms of the GNU General Public License as published by
|
||||
' the Free Software Foundation, either version 3 of the License, or
|
||||
' (at your option) any later version.
|
||||
'
|
||||
' This program is distributed in the hope that it will be useful,
|
||||
' but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
' GNU General Public License for more details.
|
||||
'
|
||||
' You should have received a copy of the GNU General Public License
|
||||
' along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
' Author:
|
||||
'
|
||||
' asuka (amethyst.asuka@gcmodeller.org)
|
||||
' xie (genetics@smrucc.org)
|
||||
' xieguigang (xie.guigang@live.com)
|
||||
'
|
||||
' Copyright (c) 2018 GPL3 Licensed
|
||||
'
|
||||
'
|
||||
' GNU GENERAL PUBLIC LICENSE (GPL3)
|
||||
'
|
||||
'
|
||||
' This program is free software: you can redistribute it and/or modify
|
||||
' it under the terms of the GNU General Public License as published by
|
||||
' the Free Software Foundation, either version 3 of the License, or
|
||||
' (at your option) any later version.
|
||||
'
|
||||
' This program is distributed in the hope that it will be useful,
|
||||
' but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
' GNU General Public License for more details.
|
||||
'
|
||||
' You should have received a copy of the GNU General Public License
|
||||
' along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
' /********************************************************************************/
|
||||
' /********************************************************************************/
|
||||
|
||||
' Summaries:
|
||||
' Summaries:
|
||||
|
||||
' Class DoubleRange
|
||||
'
|
||||
' Properties: Length, Max, Min
|
||||
'
|
||||
' Constructor: (+6 Overloads) Sub New
|
||||
' Function: Enumerate, GetEnumerator, IEnumerable_GetEnumerator, (+3 Overloads) IsInside, (+2 Overloads) IsOverlapping
|
||||
' ScaleMapping, (+2 Overloads) ToString, TryParse
|
||||
' Operators: *, <>, =
|
||||
'
|
||||
'
|
||||
' /********************************************************************************/
|
||||
' Class DoubleRange
|
||||
'
|
||||
' Properties: Length, Max, Min
|
||||
'
|
||||
' Constructor: (+6 Overloads) Sub New
|
||||
' Function: Enumerate, GetEnumerator, IEnumerable_GetEnumerator, (+3 Overloads) IsInside, (+2 Overloads) IsOverlapping
|
||||
' ScaleMapping, (+2 Overloads) ToString, TryParse
|
||||
' Operators: *, <>, =
|
||||
'
|
||||
'
|
||||
' /********************************************************************************/
|
||||
|
||||
#End Region
|
||||
|
||||
|
|
@ -55,6 +55,7 @@ Imports System.Runtime.CompilerServices
|
|||
Imports System.Xml.Serialization
|
||||
Imports Microsoft.VisualBasic.Language
|
||||
Imports Microsoft.VisualBasic.Language.Vectorization
|
||||
Imports Microsoft.VisualBasic.Linq
|
||||
|
||||
Namespace ComponentModel.Ranges.Model
|
||||
|
||||
|
|
@ -62,7 +63,7 @@ Namespace ComponentModel.Ranges.Model
|
|||
''' Represents a double range with minimum and maximum values
|
||||
''' </summary>
|
||||
Public Class DoubleRange : Implements IRanges(Of Double)
|
||||
Implements IEnumerable(Of Double)
|
||||
Implements Enumeration(Of Double)
|
||||
|
||||
''' <summary>
|
||||
''' Minimum value
|
||||
|
|
@ -284,13 +285,13 @@ Namespace ComponentModel.Ranges.Model
|
|||
Return value
|
||||
End Function
|
||||
|
||||
Public Overridable Iterator Function GetEnumerator() As IEnumerator(Of Double) Implements IEnumerable(Of Double).GetEnumerator
|
||||
Public Overridable Iterator Function GetEnumerator() As IEnumerator(Of Double) Implements Enumeration(Of Double).GenericEnumerator
|
||||
For Each x In Me.Enumerate(100)
|
||||
Yield x
|
||||
Next
|
||||
End Function
|
||||
|
||||
Private Iterator Function IEnumerable_GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator
|
||||
Private Iterator Function IEnumerable_GetEnumerator() As IEnumerator Implements Enumeration(Of Double).GetEnumerator
|
||||
Yield GetEnumerator()
|
||||
End Function
|
||||
|
||||
|
|
|
|||
|
|
@ -1,60 +1,58 @@
|
|||
#Region "Microsoft.VisualBasic::9594e92f3956920f5661adb6dd2e6ff0, Microsoft.VisualBasic.Core\Extensions\IO\Extensions\PathExtensions.vb"
|
||||
|
||||
' Author:
|
||||
'
|
||||
' asuka (amethyst.asuka@gcmodeller.org)
|
||||
' xie (genetics@smrucc.org)
|
||||
' xieguigang (xie.guigang@live.com)
|
||||
'
|
||||
' Copyright (c) 2018 GPL3 Licensed
|
||||
'
|
||||
'
|
||||
' GNU GENERAL PUBLIC LICENSE (GPL3)
|
||||
'
|
||||
'
|
||||
' This program is free software: you can redistribute it and/or modify
|
||||
' it under the terms of the GNU General Public License as published by
|
||||
' the Free Software Foundation, either version 3 of the License, or
|
||||
' (at your option) any later version.
|
||||
'
|
||||
' This program is distributed in the hope that it will be useful,
|
||||
' but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
' GNU General Public License for more details.
|
||||
'
|
||||
' You should have received a copy of the GNU General Public License
|
||||
' along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
' Author:
|
||||
'
|
||||
' asuka (amethyst.asuka@gcmodeller.org)
|
||||
' xie (genetics@smrucc.org)
|
||||
' xieguigang (xie.guigang@live.com)
|
||||
'
|
||||
' Copyright (c) 2018 GPL3 Licensed
|
||||
'
|
||||
'
|
||||
' GNU GENERAL PUBLIC LICENSE (GPL3)
|
||||
'
|
||||
'
|
||||
' This program is free software: you can redistribute it and/or modify
|
||||
' it under the terms of the GNU General Public License as published by
|
||||
' the Free Software Foundation, either version 3 of the License, or
|
||||
' (at your option) any later version.
|
||||
'
|
||||
' This program is distributed in the hope that it will be useful,
|
||||
' but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
' GNU General Public License for more details.
|
||||
'
|
||||
' You should have received a copy of the GNU General Public License
|
||||
' along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
' /********************************************************************************/
|
||||
' /********************************************************************************/
|
||||
|
||||
' Summaries:
|
||||
' Summaries:
|
||||
|
||||
' Module PathExtensions
|
||||
'
|
||||
' Function: BaseName, ChangeSuffix, Delete, DIR, DirectoryExists
|
||||
' DirectoryName, EnumerateFiles, ExtensionSuffix, FileCopy, (+2 Overloads) FileExists
|
||||
' FileLength, FileMove, FileName, FileOpened, GetBaseName
|
||||
' GetDirectoryFullPath, GetFile, GetFullPath, GetMostAppreancePath, ListDirectory
|
||||
' ListFiles, LoadEntryList, (+3 Overloads) LoadSourceEntryList, Long2Short, (+2 Overloads) NormalizePathString
|
||||
' ParentDirName, ParentPath, PathCombine, PathIllegal, ReadDirectory
|
||||
' (+2 Overloads) RelativePath, SafeCopyTo, SourceCopy, SplitPath, TheFile
|
||||
' ToDIR_URL, ToFileURL, TrimDIR, TrimSuffix, UnixPath
|
||||
'
|
||||
' Sub: MkDIR
|
||||
'
|
||||
' /********************************************************************************/
|
||||
' Module PathExtensions
|
||||
'
|
||||
' Function: BaseName, ChangeSuffix, Delete, DIR, DirectoryExists
|
||||
' DirectoryName, EnumerateFiles, ExtensionSuffix, FileCopy, (+2 Overloads) FileExists
|
||||
' FileLength, FileMove, FileName, FileOpened, GetBaseName
|
||||
' GetDirectoryFullPath, GetFile, GetFullPath, GetMostAppreancePath, ListDirectory
|
||||
' ListFiles, LoadEntryList, (+3 Overloads) LoadSourceEntryList, Long2Short, (+2 Overloads) NormalizePathString
|
||||
' ParentDirName, ParentPath, PathCombine, PathIllegal, ReadDirectory
|
||||
' (+2 Overloads) RelativePath, SafeCopyTo, SourceCopy, SplitPath, TheFile
|
||||
' ToDIR_URL, ToFileURL, TrimDIR, TrimSuffix, UnixPath
|
||||
'
|
||||
' Sub: MkDIR
|
||||
'
|
||||
' /********************************************************************************/
|
||||
|
||||
#End Region
|
||||
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.Math
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.CompilerServices
|
||||
Imports System.Text
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports Microsoft.VisualBasic.CommandLine.Reflection
|
||||
Imports Microsoft.VisualBasic.ComponentModel.DataSourceModel
|
||||
Imports Microsoft.VisualBasic.FileIO
|
||||
|
|
@ -99,10 +97,10 @@ Public Module PathExtensions
|
|||
''' <summary>
|
||||
''' Execute file delete
|
||||
''' </summary>
|
||||
''' <param name="path$"></param>
|
||||
''' <param name="path">The file path or the directory path.</param>
|
||||
''' <param name="throwEx"></param>
|
||||
''' <returns></returns>
|
||||
<Extension> Public Function Delete(path$, Optional throwEx As Boolean = False) As Boolean
|
||||
<Extension> Public Function DeleteFile(path$, Optional throwEx As Boolean = False) As Boolean
|
||||
Try
|
||||
If path.FileExists Then
|
||||
Call FileIO.FileSystem.DeleteFile(
|
||||
|
|
|
|||
Loading…
Reference in New Issue