FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TCSystemCS/MetaDataDB/Factory.cs at develop · tgoessler/TCSystemCS · GitHub
tgoessler
TCSystemCS
Repository navigation
Code
Pull requests
6
(6)
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
TCSystemCS
/
MetaDataDB
/
Factory.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
86 lines (73 loc) · 2.6 KB
Breadcrumbs
TCSystemCS
/
MetaDataDB
/
Factory.cs
Copy path
File metadata and controls
86 lines (73 loc) · 2.6 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// *******************************************************************************
//
// ******* *** *** *
// * * * *
// * * * *****
// * * *** * * ** * ** ***
// * * * * * * * **** * * *
// * * * * * * * * * * *
// * *** *** * ** ** ** * *
// *
// *******************************************************************************
// see https://github.com/tgoessler/TCSystemCS for details.
// Copyright (C) 2003 - 2026 Thomas Goessler. All Rights Reserved.
// *******************************************************************************
//
// TCSystem is the legal property of its developers.
// Please refer to the COPYRIGHT file distributed with this source distribution.
//
// *******************************************************************************
namespace
TCSystem
.
MetaDataDB
;
/// <summary>Creates and releases metadata database abstractions.</summary>
public
static
class
Factory
{
#region Public
/// <summary>Opens or creates a metadata database for reading and writing.</summary>
public
static
IDB2
CreateReadWrite
(
string
fileName
)
{
return
new
DB2
(
fileName
,
false
)
;
}
/// <summary>Opens an existing metadata database for read-only access.</summary>
public
static
IDB2Read
CreateRead
(
string
fileName
)
{
return
new
DB2
(
fileName
,
true
)
;
}
/// <summary>Opens or creates a metadata database for write access.</summary>
public
static
IDB2Write
CreateWrite
(
string
fileName
)
{
return
new
DB2
(
fileName
,
false
)
;
}
/// <summary>Closes a read/write database and sets the reference to <see langword="null" />.</summary>
public
static
void
Destroy
(
ref
IDB2
db
)
{
if
(
db
is
DB2
db2
)
{
db2
.
Close
(
)
;
}
db
=
null
;
}
/// <summary>Closes a read-only database and sets the reference to <see langword="null" />.</summary>
public
static
void
Destroy
(
ref
IDB2Read
db
)
{
if
(
db
is
DB2
db2
)
{
db2
.
Close
(
)
;
}
db
=
null
;
}
/// <summary>Closes a write database and sets the reference to <see langword="null" />.</summary>
public
static
void
Destroy
(
ref
IDB2Write
db
)
{
if
(
db
is
DB2
db2
)
{
db2
.
Close
(
)
;
}
db
=
null
;
}
/// <summary>Creates a metadata database converter.</summary>
public
static
IDB2Converter
CreateConverter
(
)
{
return
new
DB2Converter
(
)
;
}
#endregion
}
Back
|
FazBrowse Home
|
New Git URL