Some name-breaking changes so master is now v3. V2 will continue to be the code on nuget for now.

This commit is contained in:
soukoku
2014-09-15 07:24:13 -04:00
parent 0cd02ac16e
commit 92063d2b84
62 changed files with 422 additions and 267 deletions

View File

@@ -7,7 +7,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.AudioFileXfer"/>.
/// </summary>
sealed class AudioFileXfer : OpBase
sealed class AudioFileXfer : TripletBase
{
internal AudioFileXfer(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.AudioInfo"/>.
/// </summary>
sealed class AudioInfo : OpBase
sealed class AudioInfo : TripletBase
{
internal AudioInfo(ITwainSessionInternal session) : base(session) { }

View File

@@ -7,7 +7,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.AudioNativeXfer"/>.
/// </summary>
sealed class AudioNativeXfer : OpBase
sealed class AudioNativeXfer : TripletBase
{
internal AudioNativeXfer(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -3,7 +3,7 @@ using NTwain.Internals;
namespace NTwain.Triplets
{
sealed class Callback : OpBase
sealed class Callback : TripletBase
{
internal Callback(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -3,7 +3,7 @@ using NTwain.Internals;
namespace NTwain.Triplets
{
sealed class Callback2 : OpBase
sealed class Callback2 : TripletBase
{
internal Callback2(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.Capability"/>.
/// </summary>
public sealed class Capability : OpBase
public sealed class Capability : TripletBase
{
internal Capability(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// This is to support custom DAT value for custom capability defined by some manufacturers.
/// </summary>
public sealed class CapabilityCustom : OpBase
public sealed class CapabilityCustom : TripletBase
{
internal CapabilityCustom(ITwainSessionInternal session) : base(session) { }

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.CustomDSData"/>.
/// </summary>
public sealed class CustomDSData : OpBase
public sealed class CustomDSData : TripletBase
{
internal CustomDSData(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.DeviceEvent"/>.
/// </summary>
sealed class DeviceEvent : OpBase
sealed class DeviceEvent : TripletBase
{
internal DeviceEvent(ITwainSessionInternal session) : base(session) { }

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.EntryPoint"/>.
/// </summary>
sealed class EntryPoint : OpBase
sealed class EntryPoint : TripletBase
{
internal EntryPoint(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -3,7 +3,7 @@ using NTwain.Internals;
namespace NTwain.Triplets
{
sealed class Event : OpBase
sealed class Event : TripletBase
{
internal Event(ITwainSessionInternal session) : base(session) { }

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.FileSystem"/>.
/// </summary>
public sealed class FileSystem : OpBase
public sealed class FileSystem : TripletBase
{
internal FileSystem(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.Identity"/>.
/// </summary>
sealed class Identity : OpBase
sealed class Identity : TripletBase
{
internal Identity(ITwainSessionInternal session) : base(session) { }
@@ -73,7 +73,7 @@ namespace NTwain.Triplets
/// </summary>
/// <param name="source">The source.</param>
/// <returns></returns>
public ReturnCode OpenDS(TwainSource source)
public ReturnCode OpenDS(DataSource source)
{
Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.Identity, Message.OpenDS);
var rc = Dsm.DsmEntry(Session.AppId, Message.OpenDS, source.Identity);

View File

@@ -7,7 +7,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.Parent"/>.
/// </summary>
sealed class Parent : OpBase
sealed class Parent : TripletBase
{
internal Parent(ITwainSessionInternal session) : base(session) { }

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.PassThru"/>.
/// </summary>
public sealed class PassThru : OpBase
public sealed class PassThru : TripletBase
{
internal PassThru(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.PendingXfers"/>.
/// </summary>
sealed class PendingXfers : OpBase
sealed class PendingXfers : TripletBase
{
internal PendingXfers(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -7,7 +7,7 @@ namespace NTwain.Triplets
/// Represents <see cref="DataArgumentType.SetupFileXfer"/>.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Xfer")]
public sealed class SetupFileXfer : OpBase
public sealed class SetupFileXfer : TripletBase
{
internal SetupFileXfer(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -7,7 +7,7 @@ namespace NTwain.Triplets
/// Represents <see cref="DataArgumentType.SetupMemXfer"/>.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Xfer"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Mem")]
public sealed class SetupMemXfer : OpBase
public sealed class SetupMemXfer : TripletBase
{
internal SetupMemXfer(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.Status"/>.
/// </summary>
sealed class Status : OpBase
sealed class Status : TripletBase
{
internal Status(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.StatusUtf8"/>.
/// </summary>
sealed class StatusUtf8 : OpBase
sealed class StatusUtf8 : TripletBase
{
internal StatusUtf8(ITwainSessionInternal session) : base(session) { }

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.UserInterface"/>.
/// </summary>
sealed class UserInterface : OpBase
sealed class UserInterface : TripletBase
{
internal UserInterface(ITwainSessionInternal session) : base(session) { }
/// <summary>

View File

@@ -7,7 +7,7 @@ namespace NTwain.Triplets
/// Represents <see cref="DataArgumentType.XferGroup"/>.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Xfer")]
public sealed class XferGroup : OpBase
public sealed class XferGroup : TripletBase
{
internal XferGroup(ITwainSessionInternal session) : base(session) { }

View File

@@ -7,7 +7,7 @@ namespace NTwain.Triplets
/// Represents <see cref="DataArgumentType.CieColor"/>.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Cie")]
public sealed class CieColor : OpBase
public sealed class CieColor : TripletBase
{
internal CieColor(ITwainSessionInternal session) : base(session) { }

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.ExtImageInfo"/>.
/// </summary>
public sealed class ExtImageInfo : OpBase
public sealed class ExtImageInfo : TripletBase
{
internal ExtImageInfo(ITwainSessionInternal session) : base(session) { }

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.Filter"/>.
/// </summary>
public sealed class Filter : OpBase
public sealed class Filter : TripletBase
{
internal Filter(ITwainSessionInternal session) : base(session) { }

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.GrayResponse"/>.
/// </summary>
public sealed class GrayResponse : OpBase
public sealed class GrayResponse : TripletBase
{
internal GrayResponse(ITwainSessionInternal session) : base(session) { }

View File

@@ -7,7 +7,7 @@ namespace NTwain.Triplets
/// Represents <see cref="DataArgumentType.IccProfile"/>.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Icc")]
public sealed class IccProfile : OpBase
public sealed class IccProfile : TripletBase
{
internal IccProfile(ITwainSessionInternal session) : base(session) { }

View File

@@ -7,7 +7,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.ImageFileXfer"/>.
/// </summary>
sealed class ImageFileXfer : OpBase
sealed class ImageFileXfer : TripletBase
{
internal ImageFileXfer(ITwainSessionInternal session) : base(session) { }

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.ImageInfo"/>.
/// </summary>
sealed class ImageInfo : OpBase
sealed class ImageInfo : TripletBase
{
internal ImageInfo(ITwainSessionInternal session) : base(session) { }

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.ImageLayout"/>.
/// </summary>
public sealed class ImageLayout : OpBase
public sealed class ImageLayout : TripletBase
{
internal ImageLayout(ITwainSessionInternal session) : base(session) { }

View File

@@ -3,7 +3,7 @@ using NTwain.Internals;
namespace NTwain.Triplets
{
sealed class ImageMemFileXfer : OpBase
sealed class ImageMemFileXfer : TripletBase
{
internal ImageMemFileXfer(ITwainSessionInternal session) : base(session) { }

View File

@@ -3,7 +3,7 @@ using NTwain.Internals;
namespace NTwain.Triplets
{
sealed class ImageMemXfer : OpBase
sealed class ImageMemXfer : TripletBase
{
internal ImageMemXfer(ITwainSessionInternal session) : base(session) { }

View File

@@ -4,7 +4,7 @@ using System;
namespace NTwain.Triplets
{
sealed class ImageNativeXfer : OpBase
sealed class ImageNativeXfer : TripletBase
{
internal ImageNativeXfer(ITwainSessionInternal session) : base(session) { }

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.JpegCompression"/>.
/// </summary>
public sealed class JpegCompression : OpBase
public sealed class JpegCompression : TripletBase
{
internal JpegCompression(ITwainSessionInternal session) : base(session) { }

View File

@@ -6,7 +6,7 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.Palette8"/>.
/// </summary>
public sealed class Palette8 : OpBase
public sealed class Palette8 : TripletBase
{
internal Palette8(ITwainSessionInternal session) : base(session) { }

View File

@@ -7,7 +7,7 @@ namespace NTwain.Triplets
/// Represents <see cref="DataArgumentType.RgbResponse"/>.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Rgb")]
public sealed class RgbResponse : OpBase
public sealed class RgbResponse : TripletBase
{
internal RgbResponse(ITwainSessionInternal session) : base(session) { }

View File

@@ -25,12 +25,12 @@ namespace NTwain.Triplets
Message msg,
ref IntPtr data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, dg, dat, msg, ref data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, dg, dat, msg, ref data); }
else { return NativeMethods.DsmWinOld(origin, destination, dg, dat, msg, ref data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, dg, dat, msg, ref data);
}
@@ -45,12 +45,12 @@ namespace NTwain.Triplets
Message msg,
ref DataGroups data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, dg, dat, msg, ref data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, dg, dat, msg, ref data); }
else { return NativeMethods.DsmWinOld(origin, destination, dg, dat, msg, ref data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, dg, dat, msg, ref data);
}
@@ -63,12 +63,12 @@ namespace NTwain.Triplets
Message msg,
TWAudioInfo data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Audio, DataArgumentType.AudioInfo, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Audio, DataArgumentType.AudioInfo, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Audio, DataArgumentType.AudioInfo, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Audio, DataArgumentType.AudioInfo, msg, data);
}
@@ -83,12 +83,12 @@ namespace NTwain.Triplets
Message msg,
TWCapability data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, dat, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, dat, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, dat, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, dat, msg, data);
}
@@ -102,12 +102,12 @@ namespace NTwain.Triplets
Message msg,
TWCustomDSData data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.CustomDSData, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.CustomDSData, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.CustomDSData, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.CustomDSData, msg, data);
}
@@ -121,12 +121,12 @@ namespace NTwain.Triplets
Message msg,
TWDeviceEvent data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data);
}
@@ -140,12 +140,12 @@ namespace NTwain.Triplets
Message msg,
TWCallback data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data);
}
@@ -159,12 +159,12 @@ namespace NTwain.Triplets
Message msg,
TWCallback2 data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data);
}
@@ -177,12 +177,12 @@ namespace NTwain.Triplets
Message msg,
TWEntryPoint data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, null, DataGroups.Control, DataArgumentType.EntryPoint, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, null, DataGroups.Control, DataArgumentType.EntryPoint, msg, data); }
else { return NativeMethods.DsmWinOld(origin, null, DataGroups.Control, DataArgumentType.EntryPoint, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, null, DataGroups.Control, DataArgumentType.EntryPoint, msg, data);
}
@@ -196,12 +196,12 @@ namespace NTwain.Triplets
Message msg,
TWEvent data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Event, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Event, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Event, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Event, msg, data);
}
@@ -215,12 +215,12 @@ namespace NTwain.Triplets
Message msg,
TWFileSystem data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.FileSystem, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.FileSystem, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.FileSystem, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.FileSystem, msg, data);
}
@@ -232,12 +232,12 @@ namespace NTwain.Triplets
Message msg,
TWIdentity data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, IntPtr.Zero, DataGroups.Control, DataArgumentType.Identity, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, IntPtr.Zero, DataGroups.Control, DataArgumentType.Identity, msg, data); }
else { return NativeMethods.DsmWinOld(origin, IntPtr.Zero, DataGroups.Control, DataArgumentType.Identity, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, IntPtr.Zero, DataGroups.Control, DataArgumentType.Identity, msg, data);
}
@@ -251,12 +251,12 @@ namespace NTwain.Triplets
Message msg,
TWPassThru data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.PassThru, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.PassThru, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.PassThru, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.PassThru, msg, data);
}
@@ -270,12 +270,12 @@ namespace NTwain.Triplets
Message msg,
TWPendingXfers data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.PendingXfers, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.PendingXfers, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.PendingXfers, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.PendingXfers, msg, data);
}
@@ -289,12 +289,12 @@ namespace NTwain.Triplets
Message msg,
TWSetupFileXfer data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.SetupFileXfer, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.SetupFileXfer, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.SetupFileXfer, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.SetupFileXfer, msg, data);
}
@@ -308,12 +308,12 @@ namespace NTwain.Triplets
Message msg,
TWSetupMemXfer data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.SetupMemXfer, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.SetupMemXfer, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.SetupMemXfer, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.SetupMemXfer, msg, data);
}
@@ -327,12 +327,12 @@ namespace NTwain.Triplets
Message msg,
TWStatusUtf8 data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data);
}
@@ -346,12 +346,12 @@ namespace NTwain.Triplets
Message msg,
TWUserInterface data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data);
}
@@ -365,12 +365,12 @@ namespace NTwain.Triplets
Message msg,
TWCieColor data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.CieColor, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.CieColor, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.CieColor, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.CieColor, msg, data);
}
@@ -384,12 +384,12 @@ namespace NTwain.Triplets
Message msg,
TWExtImageInfo data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ExtImageInfo, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ExtImageInfo, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.ExtImageInfo, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.ExtImageInfo, msg, data);
}
@@ -402,12 +402,12 @@ namespace NTwain.Triplets
Message msg,
TWFilter data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.Filter, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.Filter, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.Filter, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.Filter, msg, data);
}
@@ -420,12 +420,12 @@ namespace NTwain.Triplets
Message msg,
TWGrayResponse data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.GrayResponse, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.GrayResponse, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.GrayResponse, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.GrayResponse, msg, data);
}
@@ -439,12 +439,12 @@ namespace NTwain.Triplets
Message msg,
TWImageInfo data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ImageInfo, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ImageInfo, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.ImageInfo, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.ImageInfo, msg, data);
}
@@ -458,12 +458,12 @@ namespace NTwain.Triplets
Message msg,
TWImageLayout data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ImageLayout, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ImageLayout, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.ImageLayout, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.ImageLayout, msg, data);
}
@@ -477,12 +477,12 @@ namespace NTwain.Triplets
Message msg,
TWImageMemXfer data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ImageMemXfer, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ImageMemXfer, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.ImageMemXfer, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.ImageMemXfer, msg, data);
}
@@ -496,12 +496,12 @@ namespace NTwain.Triplets
Message msg,
TWJpegCompression data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data);
}
@@ -515,12 +515,12 @@ namespace NTwain.Triplets
Message msg,
TWPalette8 data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.Palette8, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.Palette8, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.Palette8, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.Palette8, msg, data);
}
@@ -534,12 +534,12 @@ namespace NTwain.Triplets
Message msg,
TWRgbResponse data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.RgbResponse, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.RgbResponse, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.RgbResponse, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.RgbResponse, msg, data);
}
@@ -553,12 +553,12 @@ namespace NTwain.Triplets
Message msg,
TWStatus data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Status, msg, data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Status, msg, data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Status, msg, data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Status, msg, data);
}
@@ -573,12 +573,12 @@ namespace NTwain.Triplets
Message msg,
ref TWMemory data)
{
if (Platform.IsWin)
if (PlatformInfo.__global.IsWindows)
{
if (Platform.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, dat, msg, ref data); }
if (PlatformInfo.__global.UseNewWinDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, dat, msg, ref data); }
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, dat, msg, ref data); }
}
else if (Platform.IsLinux)
else if (PlatformInfo.__global.IsLinux)
{
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, dat, msg, ref data);
}

View File

@@ -6,14 +6,14 @@ namespace NTwain.Triplets
/// <summary>
/// Base class for grouping triplet operations messages.
/// </summary>
public abstract class OpBase
public abstract class TripletBase
{
/// <summary>
/// Initializes a new instance of the <see cref="OpBase" /> class.
/// Initializes a new instance of the <see cref="TripletBase" /> class.
/// </summary>
/// <param name="session">The session.</param>
/// <exception cref="System.ArgumentNullException"></exception>
internal OpBase(ITwainSessionInternal session)
internal TripletBase(ITwainSessionInternal session)
{
if (session == null) { throw new ArgumentNullException("session"); }
Session = session;