本文整理汇总了C#中NeoDatis.GetStartIndex方法的典型用法代码示例。如果您正苦于以下问题:C# NeoDatis.GetStartIndex方法的具体用法?C# NeoDatis.GetStartIndex怎么用?C# NeoDatis.GetStartIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NeoDatis
的用法示例。
在下文中一共展示了NeoDatis.GetStartIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetConnectionManager
private NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Message ManageGetObjectValuesCommand
(NeoDatis.Odb.Core.Server.Message.GetObjectValuesMessage message)
{
// Gets the base identifier
string baseIdentifier = message.GetBaseIdentifier();
// Gets the connection manager for this base identifier
NeoDatis.Odb.Core.Server.Connection.ConnectionManager connectionManager = null;
NeoDatis.Odb.Core.Server.Connection.IConnection connection = null;
NeoDatis.Tool.Mutex.Mutex mutex = null;
try
{
mutex = NeoDatis.Tool.Mutex.MutexFactory.Get(baseIdentifier).Acquire("getObjects"
);
// Gets the connection manager for this base identifier
connectionManager = GetConnectionManager(baseIdentifier);
if (connectionManager == null)
{
System.Text.StringBuilder buffer = new System.Text.StringBuilder();
buffer.Append("ODBServer.ConnectionThread:Base ").Append(baseIdentifier).Append(" is not registered on this server!"
);
return new NeoDatis.Odb.Core.Server.Message.GetMessageResponse(baseIdentifier, message
.GetConnectionId(), buffer.ToString());
}
connection = connectionManager.GetConnection(message.GetConnectionId());
connection.SetCurrentAction(NeoDatis.Odb.Core.Server.Connection.ConnectionAction.
ActionSelect);
NeoDatis.Odb.Core.Layers.Layer3.IStorageEngine engine = connection.GetStorageEngine
();
NeoDatis.Odb.Values values = engine.GetValues(message.GetQuery(), message.GetStartIndex
(), message.GetEndIndex());
return new NeoDatis.Odb.Core.Server.Message.GetObjectValuesMessageResponse(baseIdentifier
, message.GetConnectionId(), values, message.GetQuery().GetExecutionPlan());
}
catch (System.Exception e)
{
string se = NeoDatis.Tool.Wrappers.OdbString.ExceptionToString(e, false);
string msg = baseIdentifier + ":Error while getting objects for query " + message
.GetQuery();
NeoDatis.Tool.DLogger.Error(msg, e);
return new NeoDatis.Odb.Core.Server.Message.GetObjectValuesMessageResponse(baseIdentifier
, message.GetConnectionId(), msg + ":\n" + se);
}
finally
{
if (mutex != null)
{
mutex.Release("getObjects");
}
connection.EndCurrentAction();
}
}