本文整理汇总了C#中OperationType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# OperationType.ToString方法的具体用法?C# OperationType.ToString怎么用?C# OperationType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OperationType
的用法示例。
在下文中一共展示了OperationType.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: QueryPart
public QueryPart(OperationType operation, Type entityType, string id)
{
OperationType = operation;
ID = id ?? operation.ToString();
EntityType = entityType;
_parts = new Lazy<List<IQueryPart>>(() => new List<IQueryPart>());
}
示例2: WaitForm
public WaitForm(DBProvider db, OperationType opType)
{
this.OpType = opType;
this.db = db;
InitializeComponent();
this.Text += " "+opType.ToString();
}
示例3: Write
/// <summary>
/// Writes the specified log data.
/// </summary>
/// <param name="logData">The log data.</param>
/// <param name="operationType">Type of the operation.</param>
/// <param name="customOperationName">Name of the custom operation.</param>
public void Write(object logData, OperationType operationType, string customOperationName = null)
{
EnsureNotDisposed();
if (operationType == OperationType.Custom)
{
Guard.ArgumentNotNullOrEmpty(customOperationName, "customOperationName");
}
var operation = customOperationName;
if (operationType != OperationType.Custom)
{
operation = operationType.ToString();
}
var item = new AuditLogEntryItem(operation, Guid.NewGuid().ToString(), 1)
{
LogData = logData
};
logEntry.Items.Add(item);
}
示例4: GetConnectionString
internal Connection GetConnectionString(string moduleName, string logicDbName, string tableName, OperationType action)
{
if (!_ModuleList.ContainsKey(moduleName))
{
throw new Exceptions.DbException("模块 " + moduleName + " 不存在,请检查配置文件!");
}
Module module = _ModuleList[moduleName];
if (!module.LogicDbList.ContainsKey(logicDbName))
{
throw new Exceptions.DbException("逻辑数据库 " + logicDbName + " 不存在,请检查配置文件!");
}
LogicDb logicDb = module.LogicDbList[logicDbName];
// 获取字典中名称为tableName+action的节点
if (logicDb.TableList.ContainsKey(tableName + "__" + action.ToString()))
{
return logicDb.TableList[tableName + "__" + action.ToString()].Connection;
}
else
{
if (logicDb.TableList.ContainsKey(tableName))
{
// 如果没有指定操作类型的节点,则默认取未设定操作类型的节点
return logicDb.TableList[tableName].Connection;
}
else
{
return logicDb.DefaultConnection;
}
}
}
示例5: CreateOperationAsync
public async Task<Operation> CreateOperationAsync(string videoUrl, OperationType operationType)
{
var url = string.Format("{0}/{1}", ServiceHost, operationType.ToString().ToLowerInvariant());
var response = await SendRequestAsync(HttpMethod.Post, url, new VideoUrlRequest() { Url = videoUrl });
Operation operation = new Operation(response.Headers.GetValues(OperationLocation).First());
return operation;
}