CSharpTest.Net
CreatePolicy Enumeration
Example  See Also  Send Feedback Download Help File
CSharpTest.Net.BPlusTree Assembly > CSharpTest.Net.Collections Namespace : CreatePolicy Enumeration

Glossary Item Box

Determines if the file specified should be created

Syntax

Visual Basic (Declaration) 
Public Enum CreatePolicy 
   Inherits System.Enum
C# 
public enum CreatePolicy : System.Enum 

Members

MemberDescription
AlwaysCreates a new file even if one already exists
IfNeededCreates a new file only if it does not exist
NeverDoes not create a new file

Example

BPlusTree/BPlusTree.Test/TestBPlusTreeOptions.cs

C#Copy Code
ICloneable opt = new BPlusTree<int, int>.Options(PrimitiveSerializer.Int32, PrimitiveSerializer.Int32) 
{
    CreateFile = CreatePolicy.IfNeeded,
    BTreeOrder = 4
};
BPlusTree<int, int>.Options options = (BPlusTree<int, int>.Options)opt.Clone();
            
Assert.AreEqual(CreatePolicy.IfNeeded, options.CreateFile);
Assert.AreEqual(4, options.MaximumChildNodes);
Assert.AreEqual(4, options.MaximumValueNodes);
VB.NETCopy Code
Dim opt As ICloneable = New BPlusTree(Of Integer, Integer).Options(PrimitiveSerializer.Int32, PrimitiveSerializer.Int32) With { _
    Key .CreateFile = CreatePolicy.IfNeeded, _
    Key .BTreeOrder = 4 _
}
Dim options As BPlusTree(Of Integer, Integer).Options = DirectCast(opt.Clone(), BPlusTree(Of Integer, Integer).Options)

Assert.AreEqual(CreatePolicy.IfNeeded, options.CreateFile)
Assert.AreEqual(4, options.MaximumChildNodes)
Assert.AreEqual(4, options.MaximumValueNodes)

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         CSharpTest.Net.Collections.CreatePolicy

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys