本文整理汇总了C#中DS类的典型用法代码示例。如果您正苦于以下问题:C# DS类的具体用法?C# DS怎么用?C# DS使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DS类属于命名空间,在下文中一共展示了DS类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: KinectFieldImageTextureFloat
public KinectFieldImageTextureFloat(DS.Simulation.CompositeFieldImage.KinectFieldImage source, Color3 color, KinectFieldImageType type)
{
m_Source = source;
m_Color = color;
m_ImageType = type;
m_Image = new ImageBoxFloat(null);
m_Image.OverlayType = RugTech1.Framework.Effects.ImposterOverlayType.Add;
}
示例2: Insert
//----------------------------------------------------------------
/// Insert record: Activity
//----------------------------------------------------------------
public override IDataReader Insert(DS ds )
{
_dbCommand = _db.GetStoredProcCommand( "InsertActivity");
_db.AddInParameter(_dbCommand, ds.Activity.Visit_IDColumn.ToString(), DbType.Int32,ds.Activity.Rows[0][ds.Activity.Visit_IDColumn.ToString()]);
_db.AddInParameter(_dbCommand, ds.Activity.Activity_SequenceColumn.ToString(), DbType.Int32,ds.Activity.Rows[0][ds.Activity.Activity_SequenceColumn.ToString()]);
_db.AddInParameter(_dbCommand, ds.Activity.Activity_Type_IDColumn.ToString(), DbType.Int32,ds.Activity.Rows[0][ds.Activity.Activity_Type_IDColumn.ToString()]);
_db.AddInParameter(_dbCommand, ds.Activity.TimeColumn.ToString(), DbType.DateTime,ds.Activity.Rows[0][ds.Activity.TimeColumn.ToString()]);
_db.AddInParameter(_dbCommand, ds.Activity.TextColumn.ToString(), DbType.String,ds.Activity.Rows[0][ds.Activity.TextColumn.ToString()]);
_db.AddInParameter(_dbCommand, ds.Activity.IDColumn.ToString(), DbType.Int32,ds.Activity.Rows[0][ds.Activity.IDColumn.ToString()]);
IDataReader dr = _db.ExecuteReader( _dbCommand,_transaction);
dr.Close();
return dr;
}
示例3: MapLogType
List<Business.LogType> MapLogType(DS.LogTypeDataTable tb)
{
if (tb == null || tb.Rows.Count == 0)
{
return null;
}
List<Business.LogType> logTypeList = new List<Business.LogType>();
int count = tb.Rows.Count;
for (int i = 0; i < count; i++)
{
Business.LogType logType = new Business.LogType();
logType.ID = tb[i].LogTypeID;
logType.Name = tb[i].Name;
logTypeList.Add(logType);
}
return logTypeList;
}
示例4: MapNews
private List<Business.News> MapNews(DS.NewsDataTable tbNews)
{
List<Business.News> result = new List<Business.News>();
if (tbNews != null)
{
int count = tbNews.Count;
for (int i = 0; i < count; i++)
{
Business.News newNews = new Business.News();
newNews.Body = tbNews[i].Body;
newNews.Catetory = tbNews[i].Category;
newNews.DateCreated = tbNews[i].DateCreated;
newNews.ID = tbNews[i].ID;
newNews.Title = tbNews[i].Title;
result.Add(newNews);
}
}
return result;
}
示例5: USlotSync
/*public USlotSync():base(DS.SyncType.HARD, DateTime.Now)
{
}
*/
public USlotSync(DS.SyncType syncType, DateTime dateTime, long logid)
{
// TODO: Complete member initialization
this.syncType = syncType;
this.syncTime = dateTime;
timer = new DispatcherTimer();
this.logid = logid;
InitializeComponent();
this.UTIME.Text = syncTime.ToLongDateString() + " " + syncTime.ToLongTimeString();
this.USYNCTEXT.Text = syncType.ToString();
timer.Interval = TimeSpan.FromSeconds(10);
evtTick = new EventHandler(timer_Tick);
timer.Tick += evtTick;
}
示例6: Lex
[System.Security.SecuritySafeCritical] // auto-generated
private static Boolean Lex(DS dps, ref __DTString str, ref DateTimeToken dtok, ref DateTimeRawInfo raw, ref DateTimeResult result, ref DateTimeFormatInfo dtfi, DateTimeStyles styles)
{
TokenType tokenType;
int tokenValue;
int indexBeforeSeparator;
char charBeforeSeparator;
TokenType sep;
dtok.dtt = DTT.Unk; // Assume the token is unkown.
str.GetRegularToken(out tokenType, out tokenValue, dtfi);
#if _LOGGING
// Builds with _LOGGING defined (x86dbg, amd64chk, etc) support tracing
// Set the following internal-only/unsupported environment variables to enable DateTime tracing to the console:
//
// COMPlus_LogEnable=1
// COMPlus_LogToConsole=1
// COMPlus_LogLevel=9
// COMPlus_ManagedLogFacility=0x00001000
if (_tracingEnabled) {
BCLDebug.Trace("DATETIME", "[DATETIME] Lex({0})\tpos:{1}({2}), {3}, DS.{4}", Hex(str.Value),
str.Index, Hex(str.m_current), tokenType, dps);
}
#endif // _LOGGING
// Look at the regular token.
switch (tokenType) {
case TokenType.NumberToken:
case TokenType.YearNumberToken:
if (raw.numCount == 3 || tokenValue == -1) {
result.SetFailure(ParseFailureKind.Format, "Format_BadDateTime", null);
LexTraceExit("0010", dps);
return false;
}
//
// This is a digit.
//
// If the previous parsing state is DS.T_NNt (like 12:01), and we got another number,
// so we will have a terminal state DS.TX_NNN (like 12:01:02).
// If the previous parsing state is DS.T_Nt (like 12:), and we got another number,
// so we will have a terminal state DS.TX_NN (like 12:01).
//
// Look ahead to see if the following character is a decimal point or timezone offset.
// This enables us to parse time in the forms of:
// "11:22:33.1234" or "11:22:33-08".
if (dps == DS.T_NNt) {
if ((str.Index < str.len - 1)) {
char nextCh = str.Value[str.Index];
if (nextCh == '.') {
// While ParseFraction can fail, it just means that there were no digits after
// the dot. In this case ParseFraction just removes the dot. This is actually
// valid for cultures like Albanian, that join the time marker to the time with
// with a dot: e.g. "9:03.MD"
ParseFraction(ref str, out raw.fraction);
}
}
}
if (dps == DS.T_NNt || dps == DS.T_Nt) {
if ((str.Index < str.len - 1)) {
if (false == HandleTimeZone(ref str, ref result))
{
LexTraceExit("0020 (value like \"12:01\" or \"12:\" followed by a non-TZ number", dps);
return false;
}
}
}
dtok.num = tokenValue;
if (tokenType == TokenType.YearNumberToken)
{
if (raw.year == -1)
{
raw.year = tokenValue;
//
// If we have number which has 3 or more digits (like "001" or "0001"),
// we assume this number is a year. Save the currnet raw.numCount in
// raw.year.
//
switch (sep = str.GetSeparatorToken(dtfi, out indexBeforeSeparator, out charBeforeSeparator)) {
case TokenType.SEP_End:
dtok.dtt = DTT.YearEnd;
break;
case TokenType.SEP_Am:
case TokenType.SEP_Pm:
if (raw.timeMark == TM.NotSet) {
raw.timeMark = (sep == TokenType.SEP_Am ? TM.AM : TM.PM);
dtok.dtt = DTT.YearSpace;
} else {
result.SetFailure(ParseFailureKind.Format, "Format_BadDateTime", null);
LexTraceExit("0030 (TM.AM/TM.PM Happened more than 1x)", dps);
}
break;
case TokenType.SEP_Space:
dtok.dtt = DTT.YearSpace;
break;
case TokenType.SEP_Date:
dtok.dtt = DTT.YearDateSep;
//.........这里部分代码省略.........
示例7: PTSTraceExit
internal static void PTSTraceExit(DS dps, bool passed) {
#if _LOGGING
if (!_tracingEnabled)
return;
BCLDebug.Trace("DATETIME", "[DATETIME] ProcessTerminalState {0} @ DS.{1}", passed ? "passed" : "failed", dps);
#endif // _LOGGING
}
示例8: ProcessHebrewTerminalState
////////////////////////////////////////////////////////////////////////
//
// Actions:
// This is used by DateTime.Parse().
// Process the terminal state for the Hebrew calendar parsing.
//
////////////////////////////////////////////////////////////////////////
internal static Boolean ProcessHebrewTerminalState(DS dps, ref DateTimeResult result, ref DateTimeStyles styles, ref DateTimeRawInfo raw, DateTimeFormatInfo dtfi) {
// The following are accepted terminal state for Hebrew date.
switch (dps) {
case DS.DX_MNN:
// Deal with the default long/short date format when the year number is ambigous (i.e. year < 100).
raw.year = raw.GetNumber(1);
if (!dtfi.YearMonthAdjustment(ref raw.year, ref raw.month, true)) {
result.SetFailure(ParseFailureKind.FormatBadDateTimeCalendar, "Format_BadDateTimeCalendar", null);
return false;
}
if (!GetDayOfMNN(ref result, ref raw, dtfi)) {
return false;
}
break;
case DS.DX_YMN:
// Deal with the default long/short date format when the year number is NOT ambigous (i.e. year >= 100).
if (!dtfi.YearMonthAdjustment(ref raw.year, ref raw.month, true)) {
result.SetFailure(ParseFailureKind.FormatBadDateTimeCalendar, "Format_BadDateTimeCalendar", null);
return false;
}
if (!GetDayOfYMN(ref result, ref raw, dtfi)) {
return false;
}
break;
case DS.DX_NM:
case DS.DX_MN:
// Deal with Month/Day pattern.
GetDefaultYear(ref result, ref styles);
if (!dtfi.YearMonthAdjustment(ref result.Year, ref raw.month, true)) {
result.SetFailure(ParseFailureKind.FormatBadDateTimeCalendar, "Format_BadDateTimeCalendar", null);
return false;
}
if (!GetHebrewDayOfNM(ref result, ref raw, dtfi)) {
return false;
}
break;
case DS.DX_YM:
// Deal with Year/Month pattern.
if (!dtfi.YearMonthAdjustment(ref raw.year, ref raw.month, true)) {
result.SetFailure(ParseFailureKind.FormatBadDateTimeCalendar, "Format_BadDateTimeCalendar", null);
return false;
}
if (!GetDayOfYM(ref result, ref raw, dtfi)) {
return false;
}
break;
case DS.TX_N:
// Deal hour + AM/PM
if (!GetTimeOfN(dtfi, ref result, ref raw)) {
return false;
}
break;
case DS.TX_NN:
if (!GetTimeOfNN(dtfi, ref result, ref raw)) {
return false;
}
break;
case DS.TX_NNN:
if (!GetTimeOfNNN(dtfi, ref result, ref raw)) {
return false;
}
break;
default:
result.SetFailure(ParseFailureKind.Format, "Format_BadDateTime", null);
return false;
}
if (dps > DS.ERROR)
{
//
// We have reached a terminal state. Reset the raw num count.
//
raw.numCount = 0;
}
return true;
}
示例9: GetTypedDataSetSchema
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
DS ds = new DS();
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
any.Namespace = ds.Namespace;
sequence.Items.Add(any);
type.Particle = sequence;
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
if (xs.Contains(dsSchema.TargetNamespace)) {
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
try {
global::System.Xml.Schema.XmlSchema schema = null;
dsSchema.Write(s1);
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
s2.SetLength(0);
schema.Write(s2);
if ((s1.Length == s2.Length)) {
s1.Position = 0;
s2.Position = 0;
for (; ((s1.Position != s1.Length)
&& (s1.ReadByte() == s2.ReadByte())); ) {
;
}
if ((s1.Position == s1.Length)) {
return type;
}
}
}
}
finally {
if ((s1 != null)) {
s1.Close();
}
if ((s2 != null)) {
s2.Close();
}
}
}
xs.Add(dsSchema);
return type;
}
示例10: Fill
public virtual int Fill(DS.DesignActDataTable dataTable, string design) {
this.Adapter.SelectCommand = this.CommandCollection[0];
if ((design == null)) {
throw new global::System.ArgumentNullException("design");
}
else {
this.Adapter.SelectCommand.Parameters[0].Value = ((string)(design));
}
if ((this.ClearBeforeFill == true)) {
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
示例11: Update
public virtual int Update(DS.CombinaisonDataTable dataTable) {
return this.Adapter.Update(dataTable);
}
示例12: UpdateApps
public override DS.Web.UCenter.Api.ApiReturn UpdateApps(DS.Web.UCenter.UcApps apps)
{
throw new NotImplementedException();
}
示例13: Lex
[System.Security.SecuritySafeCritical] // auto-generated
private static Boolean Lex(
#if !FEATURE_CORECLR
DS dps, ref __DTString str, ref DateTimeToken dtok, ref DateTimeRawInfo raw, ref DateTimeResult result, ref DateTimeFormatInfo dtfi, DateTimeStyles styles)
示例14: Update
public abstract IDataReader Update(DS ds);
示例15: Insert
public abstract IDataReader Insert(DS ds);