本文整理汇总了C#中NeoDatis.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# NeoDatis.GetType方法的具体用法?C# NeoDatis.GetType怎么用?C# NeoDatis.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NeoDatis
的用法示例。
在下文中一共展示了NeoDatis.GetType方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetEngine
public static NeoDatis.Odb.Core.Layers.Layer3.IStorageEngine GetEngine(NeoDatis.Odb.ODB
odb)
{
if (odb is NeoDatis.Odb.Impl.Main.ODBAdapter)
{
NeoDatis.Odb.Impl.Main.ODBAdapter oa = (NeoDatis.Odb.Impl.Main.ODBAdapter)odb;
return oa.GetSession().GetStorageEngine();
}
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.InternalError
.AddParameter("getEngine not implemented for " + odb.GetType().FullName));
}
示例2: NeedsInstanciation
public static bool NeedsInstanciation(NeoDatis.Odb.Core.Query.IQuery query)
{
if (typeof(NeoDatis.Odb.Core.Query.NQ.NativeQuery).IsAssignableFrom(query.GetType
()))
{
return true;
}
if (typeof(NeoDatis.Odb.Core.Query.NQ.SimpleNativeQuery).IsAssignableFrom(query.GetType
()))
{
return true;
}
if (typeof(NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQuery) == query.GetType(
) || typeof(NeoDatis.Odb.Impl.Core.Query.Values.ValuesCriteriaQuery) == query.GetType
())
{
return false;
}
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.QueryTypeNotImplemented
.AddParameter(query.GetType().FullName));
}
示例3: GetNnoi
public static NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo GetNnoi(NeoDatis.Odb.ObjectRepresentation
objectRepresentation)
{
if (objectRepresentation is NeoDatis.Odb.Impl.Core.Server.Trigger.DefaultObjectRepresentation)
{
NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo nnoi = ((NeoDatis.Odb.Impl.Core.Server.Trigger.DefaultObjectRepresentation
)objectRepresentation).GetNnoi();
return nnoi;
}
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.InternalError
.AddParameter("getNnoi not implemented for " + objectRepresentation.GetType().FullName
));
}
示例4: Match
public static bool Match(NeoDatis.Odb.Core.Query.IQuery query, object @object)
{
if (typeof(NeoDatis.Odb.Core.Query.NQ.NativeQuery).IsAssignableFrom(query.GetType
()))
{
return NeoDatis.Odb.Impl.Core.Query.NQ.NativeQueryManager.Match((NeoDatis.Odb.Core.Query.NQ.NativeQuery
)query, @object);
}
if (typeof(NeoDatis.Odb.Core.Query.NQ.SimpleNativeQuery).IsAssignableFrom(query.GetType
()))
{
return NeoDatis.Odb.Impl.Core.Query.NQ.NativeQueryManager.Match((NeoDatis.Odb.Core.Query.NQ.SimpleNativeQuery
)query, @object);
}
if (typeof(NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQuery).IsAssignableFrom(
query.GetType()))
{
return NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQueryManager.Match((NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQuery
)query, @object);
}
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.QueryTypeNotImplemented
.AddParameter(query.GetType().FullName));
}
示例5: GetFullClassName
public static string GetFullClassName(NeoDatis.Odb.Core.Query.IQuery query)
{
if (typeof(NeoDatis.Odb.Core.Query.NQ.NativeQuery).IsAssignableFrom(query.GetType
()))
{
return NeoDatis.Odb.Impl.Core.Query.NQ.NativeQueryManager.GetClass((NeoDatis.Odb.Core.Query.NQ.NativeQuery
)query);
}
if (typeof(NeoDatis.Odb.Core.Query.NQ.SimpleNativeQuery).IsAssignableFrom(query.GetType
()))
{
return NeoDatis.Odb.Impl.Core.Query.NQ.NativeQueryManager.GetFullClassName((NeoDatis.Odb.Core.Query.NQ.SimpleNativeQuery
)query);
}
if (typeof(NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQuery) == query.GetType(
) || typeof(NeoDatis.Odb.Impl.Core.Query.Values.ValuesCriteriaQuery) == query.GetType
())
{
return NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQueryManager.GetFullClassName
((NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQuery)query);
}
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.QueryTypeNotImplemented
.AddParameter(query.GetType().FullName));
}
示例6: HasChanged
public virtual bool HasChanged(NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo
aoi)
{
return aoi.GetType() != typeof(NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeNullObjectInfo
);
}
示例7: IsCriteriaQuery
public static bool IsCriteriaQuery(NeoDatis.Odb.Core.Query.IQuery query)
{
return typeof(NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQuery).IsAssignableFrom
(query.GetType());
}
示例8:
/// <summary>Returns a multi class query executor (polymorphic = true)</summary>
/// <param name="query"></param>
/// <param name="engine"></param>
/// <param name="instanceBuilder"></param>
/// <returns></returns>
protected static NeoDatis.Odb.Core.Query.Execution.IQueryExecutor GetMultiClassQueryExecutor
(NeoDatis.Odb.Core.Query.IQuery query, NeoDatis.Odb.Core.Layers.Layer3.IStorageEngine
engine, NeoDatis.Odb.Core.Layers.Layer2.Instance.IInstanceBuilder instanceBuilder
)
{
if (typeof(NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQuery) == query.GetType(
))
{
return new NeoDatis.Odb.Core.Query.Execution.MultiClassGenericQueryExecutor(new NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQueryExecutor
(query, engine));
}
if (typeof(NeoDatis.Odb.Impl.Core.Query.Values.ValuesCriteriaQuery) == query.GetType
())
{
return new NeoDatis.Odb.Core.Query.Execution.MultiClassGenericQueryExecutor(new NeoDatis.Odb.Impl.Core.Query.Values.ValuesCriteriaQueryExecutor
(query, engine));
}
if (typeof(NeoDatis.Odb.Core.Query.NQ.NativeQuery).IsAssignableFrom(query.GetType
()))
{
return new NeoDatis.Odb.Core.Query.Execution.MultiClassGenericQueryExecutor(new NeoDatis.Odb.Impl.Core.Query.NQ.NativeQueryExecutor
(query, engine, instanceBuilder));
}
if (typeof(NeoDatis.Odb.Core.Query.NQ.SimpleNativeQuery).IsAssignableFrom(query.GetType
()))
{
return new NeoDatis.Odb.Core.Query.Execution.MultiClassGenericQueryExecutor(new NeoDatis.Odb.Impl.Core.Query.NQ.NativeQueryExecutor
(query, engine, instanceBuilder));
}
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.QueryTypeNotImplemented
.AddParameter(query.GetType().FullName));
}
示例9: UpdateObject
public virtual NeoDatis.Odb.OID UpdateObject(NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo
aoi, bool forceUpdate)
{
if (aoi.IsNonNativeObject())
{
return UpdateNonNativeObjectInfo((NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo
)aoi, forceUpdate);
}
if (aoi.IsNative())
{
return UpdateObject(aoi, forceUpdate);
}
// TODO : here should use if then else
throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.AbstractObjectInfoTypeNotSupported
.AddParameter(aoi.GetType().FullName));
}