本文整理汇总了C#中ChangeType类的典型用法代码示例。如果您正苦于以下问题:C# ChangeType类的具体用法?C# ChangeType怎么用?C# ChangeType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ChangeType类属于命名空间,在下文中一共展示了ChangeType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HasChangeType
public static void HasChangeType(ChangeType type, params SyncAction[] objects)
{
foreach (var obj in objects)
{
Assert.Equal(type, obj.Type);
}
}
示例2: ChangeSetting
protected virtual ExitCode ChangeSetting(IClientSettings clientSettings, SettingsLocation location, ChangeType changeType)
{
// Don't want to save defaults for options that apply directly to this command
List<string> settingsToSkip = new List<string>();
settingsToSkip.AddRange(StandardOptions.List);
settingsToSkip.AddRange(StandardOptions.Add);
settingsToSkip.AddRange(StandardOptions.Remove);
foreach (var setting in this.Arguments.Options)
{
if (settingsToSkip.Contains(setting.Key, StringComparer.OrdinalIgnoreCase)) { continue; }
bool success = false;
switch (changeType)
{
case ChangeType.Add:
this.Loggers[LoggerType.Status].Write(XTaskStrings.DefaultsSavingProgress, setting.Key);
success = clientSettings.SaveSetting(location, setting.Key, setting.Value);
break;
case ChangeType.Remove:
this.Loggers[LoggerType.Status].Write(XTaskStrings.DefaultsRemovingProgress, setting.Key);
success = clientSettings.RemoveSetting(location, setting.Key);
break;
}
this.Loggers[LoggerType.Status].WriteLine(success ? XTaskStrings.Succeeded : XTaskStrings.Failed);
}
return ExitCode.Success;
}
示例3: PythonTypeChangedEventArgs
public PythonTypeChangedEventArgs(CodeContext context, SymbolId changed, ChangeType type, object previous, object newValue) {
_context = context;
_changed = changed;
_type = type;
_previous = previous;
_newValue = newValue;
}
示例4: ChangeEvent
public ChangeEvent(ChangeType type, UniqueId beforeId, UniqueId afterId, Instant versionInstant)
{
_type = type;
_beforeId = beforeId;
_afterId = afterId;
_versionInstant = versionInstant;
}
示例5: HistoryItem
public HistoryItem(StreamReader sr)
{
this.user = sr.ReadLine();
this.type = (ChangeType)Convert.ToInt32(sr.ReadLine());
this.otherInfo = sr.ReadLine();
this.time = new DateTime(Convert.ToInt64(sr.ReadLine()));
}
示例6: ChangeEntry
/// <summary>
/// Initializes a new instance.
/// </summary>
internal ChangeEntry(ChangeType changeType, IUberMap map, object entity)
{
UberMap = map;
ChangeType = changeType;
Entity = entity;
MetaEntity = MetaEntity.Locate(entity);
}
示例7: Change
public Change(string resultRow)
{
string[] separated = resultRow.Split(' ');
ChangeType = GetFromString(separated[0]);
FullPath = separated[1];
Name = Path.GetFileName(separated[1]);
}
示例8: ChangeAction
public ChangeAction(ChangeType changeType, TranscriptionElement changedElement, TranscriptionIndex changeIndex, int changeAbsoluteIndex)
{
_changeType = changeType;
_changedElement = changedElement;
_changeTranscriptionIndex = changeIndex;
_changeAbsoluteIndex = changeAbsoluteIndex;
}
示例9: FileChange
internal FileChange(string directory, string path, ChangeType type)
{
Debug.Assert(path != null);
_directory = directory;
_path = path;
_chageType = type;
}
示例10: ProviderChangeMessage
/// <summary>
/// This constructor is used when triggering a provider change
/// </summary>
/// <param name="providerId">Provider Id</param>
/// <param name="aigSubscriberId">Subscriber Id</param>
/// <param name="changeType">Change Type</param>
/// <param name="isAttributeUpdate">Attribute update</param>
/// <param name="isRateUpdate">Rate update</param>
/// <param name="isFullUpdate">Full update</param>
private ProviderChangeMessage(Guid providerId, Guid aigSubscriberId, ChangeType changeType, bool isAttributeUpdate, bool isRateUpdate, bool isFullUpdate)
: base(providerId, aigSubscriberId, changeType)
{
IsAttributeUpdate = isAttributeUpdate;
IsRateUpdate = isRateUpdate;
IsFullUpdate = isFullUpdate;
}
示例11: AssertChange
private void AssertChange(string name, ChangeType change)
{
RootDetail r1 = ExtractAttribute(Subjects.One, name);
RootDetail r2 = ExtractAttribute(Subjects.Two, name);
Assert.AreEqual(change, r1.PerformCompare(r2));
}
示例12: Transition
public virtual void Transition(BaseScreen transitionTo, ChangeType changeType)
{
Transitioning = true;
TransitionTo = transitionTo;
ChangeType = changeType;
transitionTimer = TimeSpan.Zero;
}
示例13: TableChanges
public TableChanges(Table oldTable, Table newTable, ChangeType changeType)
{
this.OldTable = oldTable;
this.NewTable = newTable;
this.ChangeType = changeType;
this.ColumnsChanged = new List<ColumnChanges>();
}
示例14: OnAppliedChange
void OnAppliedChange(ChangeType type, string newPath, string oldPath = null)
{
if (AppliedChange != null)
{
AppliedChange(this, new MyAppliedChangeEventArgs(type, newPath, oldPath));
}
}
示例15: IsInOriginalDocument
public static bool IsInOriginalDocument(ChangeType t)
{
switch (t)
{
case ChangeType.None:
case ChangeType.Deletion:
case ChangeType.MoveSource:
case ChangeType.FormatChange:
case ChangeType.Match:
case ChangeType.ChangedText:
case ChangeType.StyleChangeText:
return true;
case ChangeType.MoveDestination:
case ChangeType.Insertion:
case ChangeType.MovedDeletion:
case ChangeType.CellInserted:
case ChangeType.CellDeleted:
case ChangeType.CellMerged:
case ChangeType.CellIsPadding:
case ChangeType.ChangeNumber:
case ChangeType.Delimiter:
case ChangeType.StyleChangedLabel:
case ChangeType.Comment:
case ChangeType.InsertedComment:
case ChangeType.DeletedComment:
case ChangeType.ChangedComment:
default:
return false;
}
}