Definition at line 25 of file ExternalRoutineInfo.cs.
Deveel.Data.Routines.ExternalRoutineInfo.ExternalRoutineInfo |
( |
Type |
type, |
|
|
Type[] |
argTypes |
|
) |
| |
|
inline |
Deveel.Data.Routines.ExternalRoutineInfo.ExternalRoutineInfo |
( |
Type |
type | ) |
|
|
inline |
Deveel.Data.Routines.ExternalRoutineInfo.ExternalRoutineInfo |
( |
Type |
type, |
|
|
string |
methodName |
|
) |
| |
|
inline |
Definition at line 34 of file ExternalRoutineInfo.cs.
35 :
this(type, methodName,
Type.EmptyTypes) {
A user-defined TYPE that holds complex objects in a database column.
Deveel.Data.Routines.ExternalRoutineInfo.ExternalRoutineInfo |
( |
Type |
type, |
|
|
string |
methodName, |
|
|
Type[] |
argTypes |
|
) |
| |
|
inline |
Deveel.Data.Routines.ExternalRoutineInfo.ExternalRoutineInfo |
( |
string |
typeString, |
|
|
string |
methodName |
|
) |
| |
|
inline |
Deveel.Data.Routines.ExternalRoutineInfo.ExternalRoutineInfo |
( |
string |
typeString, |
|
|
string |
methodName, |
|
|
string[] |
argNames |
|
) |
| |
|
inline |
static string Deveel.Data.Routines.ExternalRoutineInfo.FormatString |
( |
Type |
type | ) |
|
|
inlinestatic |
Definition at line 278 of file ExternalRoutineInfo.cs.
static string FormatString(Type type)
A user-defined TYPE that holds complex objects in a database column.
static string Deveel.Data.Routines.ExternalRoutineInfo.FormatString |
( |
Type |
type, |
|
|
Type[] |
argTypes |
|
) |
| |
|
inlinestatic |
static string Deveel.Data.Routines.ExternalRoutineInfo.FormatString |
( |
Type |
type, |
|
|
string |
methodName |
|
) |
| |
|
inlinestatic |
Definition at line 286 of file ExternalRoutineInfo.cs.
static string FormatString(Type type)
A user-defined TYPE that holds complex objects in a database column.
static string Deveel.Data.Routines.ExternalRoutineInfo.FormatString |
( |
Type |
type, |
|
|
string |
methodName, |
|
|
Type[] |
argTypes |
|
) |
| |
|
inlinestatic |
Definition at line 290 of file ExternalRoutineInfo.cs.
292 return routineInfo.ToString();
ExternalRoutineInfo(Type type, Type[] argTypes)
Definition at line 246 of file ExternalRoutineInfo.cs.
248 int parentheseDelim = s.IndexOf(
"(", StringComparison.InvariantCulture);
250 if (parentheseDelim != -1) {
252 string typeMethod = s.Substring(0, parentheseDelim);
254 int methodDelim = typeMethod.LastIndexOf(
".", StringComparison.InvariantCulture);
255 if (methodDelim == -1)
256 throw new FormatException(
"Incorrectly formatted method string: " + s);
258 string typeString = typeMethod.Substring(0, methodDelim);
259 string methodString = typeMethod.Substring(methodDelim + 1);
262 int endParentheseDelim = s.LastIndexOf(
")", StringComparison.InvariantCulture);
263 if (endParentheseDelim == -1)
264 throw new FormatException(
"Incorrectly formatted method string: " + s);
266 string argListStr = s.Substring(parentheseDelim + 1, endParentheseDelim - (parentheseDelim + 1));
269 string[] args = argListStr.Split(
new[]{
','}, StringSplitOptions.RemoveEmptyEntries);
ExternalRoutineInfo(Type type, Type[] argTypes)
MethodInfo Deveel.Data.Routines.ExternalRoutineInfo.ResolveMethod |
( |
TType[] |
paramTypes | ) |
|
|
inline |
Definition at line 155 of file ExternalRoutineInfo.cs.
163 bool firstProcedureConnectionIgnore;
169 methodName =
"Invoke";
171 argTypes =
new Type[paramTypes.Length];
173 firstProcedureConnectionIgnore =
true;
181 for (
int i = 0; i <
Arguments.Length; ++i) {
186 firstProcedureConnectionIgnore =
false;
189 Type routineType =
Type.GetType(typeName,
false,
true);
190 if (routineType == null)
191 throw new Exception(
"Procedure class not found: " + typeName);
194 MethodInfo[] methods = routineType.GetMethods(BindingFlags.Public | BindingFlags.Static);
195 MethodInfo invokeMethod = null;
197 foreach (MethodInfo method
in methods) {
198 if (method.Name.Equals(methodName)) {
202 ParameterInfo[] methodArgs = method.GetParameters();
206 if (methodArgs.Length == 0 && argTypes.Length == 0) {
211 if (firstProcedureConnectionIgnore &&
212 typeof(IProcedureConnection).IsAssignableFrom(methodArgs[0].ParameterType)) {
217 if (argTypes.Length == methodArgs.Length - searchStart) {
219 bool matchSpec =
true;
220 for (
int n = 0; n < argTypes.Length && matchSpec; ++n) {
221 Type argType = argTypes[n];
222 if (argType != null &&
223 argType != methodArgs[n + searchStart].ParameterType) {
227 paramsMatch = matchSpec;
234 if (invokeMethod != null)
235 throw new Exception(
"Ambiguous public static " + methodName +
" methods in stored procedure class '" + typeName +
"'");
237 invokeMethod = method;
A long string in the system.
A user-defined TYPE that holds complex objects in a database column.
static Type ResolveToType(string typeString)
Resolves a type specification string to a Type.
static Type Deveel.Data.Routines.ExternalRoutineInfo.ResolveToType |
( |
string |
typeString | ) |
|
|
inlinestaticprivate |
Resolves a type specification string to a Type.
- Parameters
-
- Returns
Definition at line 79 of file ExternalRoutineInfo.cs.
81 typeString = typeString.Trim();
85 int lastIndex = typeString.Length;
86 while (lastIndex > 0) {
88 lastIndex = typeString.LastIndexOf(
"[]", lastIndex, StringComparison.InvariantCulture) - 1;
92 int arrayEnd = typeString.Length - (dimensions * 2);
93 String typePart = typeString.Substring(0, arrayEnd);
95 if (typePart.IndexOf(
"[]", StringComparison.InvariantCulture) != -1)
96 throw new Exception(
"Type specification incorrectly formatted: " + typeString);
102 if (typePart.IndexOf(
'.') != -1) {
105 cl =
Type.GetType(typePart);
106 }
catch (TypeLoadException) {
107 throw new Exception(
"Type not found: " + typePart);
112 else if (typePart.Equals(
"boolean") ||
113 typePart.Equals(
"bool")) {
115 }
else if (typePart.Equals(
"byte")) {
117 }
else if (typePart.Equals(
"short")) {
119 }
else if (typePart.Equals(
"char")) {
121 }
else if (typePart.Equals(
"int")) {
123 }
else if (typePart.Equals(
"long")) {
125 }
else if (typePart.Equals(
"float")) {
127 }
else if (typePart.Equals(
"double")) {
132 if (typePart.Equals(
"IProcedureConnection")) {
133 cl = typeof(IProcedureConnection);
136 cl =
Type.GetType(
"System." + typePart);
137 }
catch (TypeLoadException) {
139 throw new Exception(
"Type not found: " + typePart);
145 if (dimensions > 0) {
148 cl =
Array.CreateInstance(cl,
new int[dimensions]).GetType();
A long string in the system.
A user-defined TYPE that holds complex objects in a database column.
override string Deveel.Data.Routines.ExternalRoutineInfo.ToString |
( |
| ) |
|
|
inline |
static string [] Deveel.Data.Routines.ExternalRoutineInfo.ToTypeNames |
( |
Type[] |
argTypes | ) |
|
|
inlinestaticprivate |
Definition at line 62 of file ExternalRoutineInfo.cs.
63 if (argTypes == null || argTypes.Length == 0)
66 var argNames =
new string[argTypes.Length];
67 for (var i = 0; i < argTypes.Length; i++) {
68 argNames[i] = argTypes[i].FullName;
string [] Deveel.Data.Routines.ExternalRoutineInfo.Arguments |
|
getprivate set |
bool Deveel.Data.Routines.ExternalRoutineInfo.HasMethodName |
|
get |
string Deveel.Data.Routines.ExternalRoutineInfo.MethodName |
|
getprivate set |
string Deveel.Data.Routines.ExternalRoutineInfo.TypeName |
|
getprivate set |
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb/Deveel.Data.Routines/ExternalRoutineInfo.cs