本文整理汇总了C#中IRole.NullCheck方法的典型用法代码示例。如果您正苦于以下问题:C# IRole.NullCheck方法的具体用法?C# IRole.NullCheck怎么用?C# IRole.NullCheck使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IRole
的用法示例。
在下文中一共展示了IRole.NullCheck方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateContext
/// <summary>
/// 根据流程和角色创建SOARoleContext
/// </summary>
/// <param name="role"></param>
/// <param name="process"></param>
/// <returns></returns>
public static SOARoleContext CreateContext(IRole role, IWfProcess process)
{
role.NullCheck("role");
SOARole soaRole = (SOARole)SOARole.CreateWrapperObject(role);
return CreateContext(soaRole.PropertyDefinitions, process);
}
示例2: GetByRole
public SOARolePropertyRowCollection GetByRole(IRole role, SOARolePropertyDefinitionCollection definition)
{
role.NullCheck("role");
SOARolePropertyRowCollection result = SOARolePropertiesCache.Instance.GetOrAddNewValue(role.ID.ToRoleIDCacheKey(), (cache, key) =>
{
SOARolePropertyRowCollection properties = LoadByRole(role, definition);
MixedDependency dependency = new MixedDependency(new UdpNotifierCacheDependency(), new MemoryMappedFileNotifierCacheDependency());
cache.Add(key, properties, dependency);
return properties;
});
return result;
}
示例3: LoadByRole
public SOARolePropertyDefinitionCollection LoadByRole(IRole role)
{
role.NullCheck("role");
return LoadByRoleID(role.ID);
}
示例4: Delete
public void Delete(IRole role)
{
role.NullCheck("role");
this.Delete(role.ID);
}
示例5: Update
public void Update(IRole role, SOARolePropertyDefinitionCollection properties)
{
role.NullCheck("role");
properties.NullCheck("properties");
this.Update(role.ID, properties);
}
示例6: LoadByRole
public SOARolePropertyRowCollection LoadByRole(IRole role, SOARolePropertyDefinitionCollection definition)
{
role.NullCheck("role");
return LoadByRoleID(role.ID, role, definition);
}
示例7: WfRoleResourceDescriptor
public WfRoleResourceDescriptor(IRole role)
{
role.NullCheck("role");
this._Role = (IRole)SOARole.CreateWrapperObject(role);
}