本文整理汇总了C#中DAT类的典型用法代码示例。如果您正苦于以下问题:C# DAT类的具体用法?C# DAT怎么用?C# DAT使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DAT类属于命名空间,在下文中一共展示了DAT类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SelectAll
public static DAT.v1.DTO.BOM.Response<DAT.v1.Assets.Developement.DTO.Database.Database.Database> SelectAll(string databaseName, string authToken, string api_url, DAT.v1.Utils.Enumerations.DataExchangeFormats format)
{
DAT.v1.DTO.BOM.RequestOptions options = new DAT.v1.DTO.BOM.RequestOptions()
{
AuthenticationToken = authToken,
ApiUrl = api_url,
EndPoint = Constants.EndPoint,
Method = DAT.v1.Utils.Enumerations.HttpVerbs.GET,
RequestType = format,
ResponseType = format
};
switch (format)
{
case DAT.v1.Utils.Enumerations.DataExchangeFormats.JSON:
return Utils.Serialization.JSON.Serializer.Deserialize<DAT.v1.DTO.BOM.Response<DAT.v1.Assets.Developement.DTO.Database.Database.Database>>(DAT.v1.DTO.BOM.Request.Send(options));
case DAT.v1.Utils.Enumerations.DataExchangeFormats.XML:
return Utils.Serialization.XML.Serializer.Deserialize<DAT.v1.DTO.BOM.Response<DAT.v1.Assets.Developement.DTO.Database.Database.Database>>(DAT.v1.DTO.BOM.Request.Send(options));
default:
throw new DAT.v1.DTO.BOM.Exceptions.SerializationNotImplementedException("Format not supported.");
};
}
示例2:
private static extern UInt16 MacosxDsmEntryIccprofile
(
ref TW_IDENTITY_MACOSX origin,
ref TW_IDENTITY_MACOSX dest,
DG dg,
DAT dat,
MSG msg,
ref TW_MEMORY twmemory
);
示例3: ProcessEvent
/// <summary>
/// Our callback delegate for Linux...
/// </summary>
/// <param name="origin">Origin of message</param>
/// <param name="dest">Message target</param>
/// <param name="dg">Data group</param>
/// <param name="dat">Data argument type</param>
/// <param name="msg">Operation</param>
/// <param name="twnull">NULL pointer</param>
/// <returns>TWAIN status</returns>
private UInt16 LinuxDsmEntryCallbackProxy
(
ref TW_IDENTITY_LEGACY origin,
ref TW_IDENTITY_LEGACY dest,
DG dg,
DAT dat,
MSG msg,
IntPtr twnull
)
{
ProcessEvent(msg);
return ((UInt16)STS.SUCCESS);
}
示例4: DsmEntry
/// <summary>
/// Generic DSM when the dest must be a data source...
/// </summary>
/// <param name="a_dg">Data group</param>
/// <param name="a_dat">Data argument type</param>
/// <param name="a_msg">Operation</param>
/// <param name="a_twmemref">Pointer to data</param>
/// <returns>TWAIN status</returns>
public STS DsmEntry(DG a_dg, DAT a_dat, MSG a_msg, IntPtr a_twmemref)
{
STS sts;
// Submit the work to the TWAIN thread...
if ((m_threadTwain != null) && (m_threadTwain.ManagedThreadId != Thread.CurrentThread.ManagedThreadId))
{
lock (m_lockTwain)
{
// Set our command variables...
ThreadData threaddata = default(ThreadData);
threaddata.twmemref = a_twmemref;
threaddata.dg = a_dg;
threaddata.msg = a_msg;
threaddata.dat = a_dat;
long lIndex = m_twaincommand.Submit(threaddata);
// Submit the command and wait for the reply...
CallerToThreadSet();
ThreadToCallerWaitOne();
// Return the result...
a_twmemref = m_twaincommand.Get(lIndex).twmemref;
sts = m_twaincommand.Get(lIndex).sts;
// Clear the command variables...
m_twaincommand.Delete(lIndex);
}
return (sts);
}
// Log it...
if (Log.GetLevel() > 0)
{
Log.LogSendBefore(a_dg.ToString(), a_dat.ToString(), a_msg.ToString(), "");
}
// Windows...
if (ms_platform == Platform.WINDOWS)
{
// Issue the command...
try
{
if (m_blUseLegacyDSM)
{
sts = (STS)WindowsTwain32DsmEntry(ref m_twidentitylegacyApp, ref m_twidentitylegacyDs, a_dg, a_dat, a_msg, a_twmemref);
}
else
{
sts = (STS)WindowsTwaindsmDsmEntry(ref m_twidentitylegacyApp, ref m_twidentitylegacyDs, a_dg, a_dat, a_msg, a_twmemref);
}
}
catch
{
// The driver crashed...
Log.LogSendAfter(STS.BUMMER.ToString(), "");
return (STS.BUMMER);
}
}
// Linux...
else if (ms_platform == Platform.LINUX)
{
// Issue the command...
try
{
if (GetMachineWordBitSize() == 32)
{
sts = (STS)LinuxDsmEntry(ref m_twidentitylegacyApp, ref m_twidentitylegacyDs, a_dg, a_dat, a_msg, a_twmemref);
}
else
{
sts = (STS)Linux64DsmEntry(ref m_twidentityApp, ref m_twidentityDs, a_dg, a_dat, a_msg, a_twmemref);
}
}
catch
{
// The driver crashed...
Log.LogSendAfter(STS.BUMMER.ToString(), "");
return (STS.BUMMER);
}
}
// Mac OS X, which has to be different...
else if (ms_platform == Platform.MACOSX)
{
// Issue the command...
try
{
sts = (STS)MacosxDsmEntry(ref m_twidentitymacosxApp, ref m_twidentitymacosxDs, a_dg, DAT.AUDIOINFO, a_msg, a_twmemref);
}
catch
//.........这里部分代码省略.........