本文整理汇总了C#中IIdentifier类的典型用法代码示例。如果您正苦于以下问题:C# IIdentifier类的具体用法?C# IIdentifier怎么用?C# IIdentifier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IIdentifier类属于命名空间,在下文中一共展示了IIdentifier类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: EnterpriseDataService
public EnterpriseDataService(IIdentifier identifier, IEnterpriseDataRepository repository, IPersonsUploader uploader)
{
_identifier = identifier;
_enterpriseRepository = repository;
_uploader = uploader;
_enterpriseId = _identifier.EnterpriseId(System.Threading.Thread.CurrentPrincipal.Identity.Name);
}
开发者ID:asdlvs,项目名称:MinStat,代码行数:7,代码来源:EnterpriseDataService.cs
示例2: AuthorizationHideForSessionFacet
public AuthorizationHideForSessionFacet(IIdentifier identifier,
IAuthorizationManager authorizationManager,
ISpecification holder)
: base(holder) {
this.identifier = identifier;
this.authorizationManager = authorizationManager;
}
开发者ID:Robin--,项目名称:NakedObjectsFramework,代码行数:7,代码来源:AuthorizationHideForSessionFacet.cs
示例3: SecurityHideForSessionFacet
public SecurityHideForSessionFacet(IIdentifier identifier,
SecurityFacetDecorator decorator,
IFacetHolder holder)
: base(holder) {
this.identifier = identifier;
this.decorator = decorator;
}
开发者ID:radi4music,项目名称:NakedObjectsFramework,代码行数:7,代码来源:SecurityFacetDecorator.cs
示例4: DescribedAsFacetDynamicWrapI18n
public DescribedAsFacetDynamicWrapI18n(II18nManager manager, IFacetHolder holder, IIdentifier identifier, IDescribedAsFacet describedAsFacet, int index = -1)
: base(Type, holder) {
this.manager = manager;
this.identifier = identifier;
this.describedAsFacet = describedAsFacet;
this.index = index;
}
开发者ID:radi4music,项目名称:NakedObjectsFramework,代码行数:7,代码来源:DescribedAsFacetDynamicWrapI18n.cs
示例5: NamedFacetDynamicWrapI18n
public NamedFacetDynamicWrapI18n(II18nManager manager, IFacetHolder holder, IIdentifier identifier, INamedFacet namedFacet, int index = -1)
: base(Type, holder) {
this.manager = manager;
this.identifier = identifier;
this.namedFacet = namedFacet;
this.index = index;
}
开发者ID:radi4music,项目名称:NakedObjectsFramework,代码行数:8,代码来源:NamedFacetDynamicWrapI18n.cs
示例6: AssignmentStatement
/// <summary>
/// Initializes a new instance of the <see cref="AssignmentStatement"/> class.
/// </summary>
/// <param name="id">The identifier.</param>
/// <param name="expression">The expression.</param>
public AssignmentStatement(IIdentifier id, IExpression expression)
{
if (id == null) throw new ArgumentNullException("id");
if (expression == null) throw new ArgumentNullException("expression");
this.ID = id;
this.ID.Type = expression.Type;
this.Expression = expression;
}
开发者ID:JaCraig,项目名称:PNZR,代码行数:13,代码来源:AssignmentStatement.cs
示例7: WithScope
public WithScope(WithScope parent, IIdentifier identifier)
{
if (identifier == null)
throw new ArgumentNullException("identifier");
Parent = parent;
Identifier = identifier;
}
开发者ID:pvginkel,项目名称:Jint2,代码行数:8,代码来源:WithScope.cs
示例8: VariableDeclaration
public VariableDeclaration(IIdentifier identifier, ExpressionSyntax expression, bool global)
{
if (identifier == null)
throw new ArgumentNullException("identifier");
Identifier = identifier;
Expression = expression;
Global = global;
}
开发者ID:pvginkel,项目名称:Jint2,代码行数:9,代码来源:VariableDeclaration.cs
示例9: FunctionCallExpression
/// <summary>
/// Initializes a new instance of the <see cref="FunctionCallExpression"/> class.
/// </summary>
/// <param name="identifier">The identifier.</param>
/// <param name="argumentList">The argument list.</param>
/// <exception cref="System.ArgumentNullException">argumentList or identifier</exception>
public FunctionCallExpression(IIdentifier identifier, IArgumentList argumentList)
{
if (argumentList == null)
throw new ArgumentNullException("argumentList");
if (identifier == null)
throw new ArgumentNullException("identifier");
this.ArgumentList = argumentList;
this.Identifier = identifier;
}
开发者ID:JaCraig,项目名称:PNZR,代码行数:15,代码来源:FunctionCallExpression.cs
示例10: CatchClause
public CatchClause(IIdentifier identifier, SyntaxNode statement)
{
if (identifier == null)
throw new ArgumentNullException("identifier");
if (statement == null)
throw new ArgumentNullException("statement");
Identifier = identifier;
Body = statement;
}
开发者ID:pvginkel,项目名称:Jint2,代码行数:10,代码来源:CatchClause.cs
示例11: IsVisible
public bool IsVisible(ISession session, INakedObject target, IIdentifier member) {
var checkViewType = member.IsField ? CheckType.ViewField : CheckType.Action;
var checkEditType = member.IsField ? CheckType.EditField : CheckType.Action;
var contextView = new AuthorizationContext((ClaimsPrincipal)session.Principal, member.ToIdentityString(IdentifierDepth.ClassName), ((int)checkViewType).ToString());
var contextEdit = new AuthorizationContext((ClaimsPrincipal)session.Principal, member.ToIdentityString(IdentifierDepth.ClassName), ((int)checkEditType).ToString());
// being editable implies visibility
return manager.CheckAccess(contextView) || manager.CheckAccess(contextEdit);
}
开发者ID:radi4music,项目名称:NakedObjectsFramework,代码行数:10,代码来源:WifAuthorizer.cs
示例12: IsEditable
public bool IsEditable(ISession session, ILifecycleManager lifecycleManager, INakedObjectAdapter target, IIdentifier identifier) {
object authorizer = GetAuthorizer(target, lifecycleManager);
Type authType = authorizer.GetType();
if ((typeof(INamespaceAuthorizer)).IsAssignableFrom(authType)) {
var nameAuth = (INamespaceAuthorizer) authorizer;
return nameAuth.IsEditable(session.Principal, target.Object, identifier.MemberName);
}
return isEditableDelegates[authType](authorizer, session.Principal, target.GetDomainObject(), identifier.MemberName);
}
开发者ID:Robin--,项目名称:NakedObjectsFramework,代码行数:10,代码来源:AuthorizationManager.cs
示例13: Invoke
public void Invoke(INakedObject nakedObject, INakedObject[] parameters, bool queryOnly, IIdentifier identifier) {
Init();
IAuditor auditor = GetNamespaceAuthorizerFor(nakedObject) ?? defaultAuditor;
if (nakedObject.Specification.IsService) {
string serviceName = nakedObject.Specification.GetTitle(nakedObject);
auditor.ActionInvoked(NakedObjectsContext.Session.Principal, identifier.MemberName, serviceName, queryOnly, parameters.Select(no => no.GetDomainObject()).ToArray());
}
else {
auditor.ActionInvoked(NakedObjectsContext.Session.Principal, identifier.MemberName, nakedObject.GetDomainObject(), queryOnly, parameters.Select(no => no.GetDomainObject()).ToArray());
}
}
开发者ID:radi4music,项目名称:NakedObjectsFramework,代码行数:12,代码来源:AuditManager.cs
示例14: Invoke
public void Invoke(INakedObjectAdapter nakedObjectAdapter, INakedObjectAdapter[] parameters, bool queryOnly, IIdentifier identifier, ISession session, ILifecycleManager lifecycleManager) {
IAuditor auditor = GetAuditor(nakedObjectAdapter, lifecycleManager);
IPrincipal byPrincipal = session.Principal;
string memberName = identifier.MemberName;
if (nakedObjectAdapter.Spec is IServiceSpec) {
string serviceName = nakedObjectAdapter.Spec.GetTitle(nakedObjectAdapter);
auditor.ActionInvoked(byPrincipal, memberName, serviceName, queryOnly, parameters.Select(no => no.GetDomainObject()).ToArray());
}
else {
auditor.ActionInvoked(byPrincipal, memberName, nakedObjectAdapter.GetDomainObject(), queryOnly, parameters.Select(no => no.GetDomainObject()).ToArray());
}
}
开发者ID:Robin--,项目名称:NakedObjectsFramework,代码行数:13,代码来源:AuditManager.cs
示例15: IsSpecialCase
/// <summary>
/// Returns true when the name comparison is a special case and should not
/// be used to determine name conflicts.
/// </summary>
/// <param name="whoIsAsking">the identifier that is checking to see if there is a conflict</param>
/// <param name="reservedName">the identifier that would normally be reserved.</param>
/// <returns></returns>
public override bool IsSpecialCase(IIdentifier whoIsAsking, IIdentifier reservedName)
{
if (whoIsAsking is Property && reservedName is CompositeType)
{
var parent = (whoIsAsking as IChild)?.Parent as IIdentifier;
if (ReferenceEquals(parent, reservedName))
{
return false;
}
// special case: properties can have the same name as a compositetype
// unless it is the same name as a parent.
return true;
}
return false;
}
开发者ID:devigned,项目名称:autorest,代码行数:22,代码来源:CodeNamerCs.cs
示例16: InteractionContext
private InteractionContext(InteractionType interactionType,
ISession session,
bool programmatic,
INakedObjectAdapter target,
IIdentifier id,
INakedObjectAdapter proposedArgument,
INakedObjectAdapter[] arguments) {
this.interactionType = interactionType;
this.programmatic = programmatic;
this.id = id;
this.session = session;
this.target = target;
this.proposedArgument = proposedArgument;
proposedArguments = arguments;
}
开发者ID:Robin--,项目名称:NakedObjectsFramework,代码行数:15,代码来源:InteractionContext.cs
示例17: CreateItem
public EquationBuilder CreateItem(IIdentifier identifier, out IItem item)
{
var selectedFactories = Factories.Where(factory => factory.CanCreate(identifier));
switch(selectedFactories.Count())
{
case 0:
throw new ArgumentException("no factory available");
case 1: item = selectedFactories.First().Create(identifier);
break;
default:
throw new ArgumentException("more than one factory can create a such item");
}
return this;
}
开发者ID:cristiingineru,项目名称:EquationEditor,代码行数:16,代码来源:EquationBuilder.cs
示例18: GetDescriptionFacet
private IFacet GetDescriptionFacet(IFacetHolder holder, IDescribedAsFacet facet, IIdentifier identifier) {
string i18nDescription;
string original = (facet).Value;
if (holder is NakedObjectActionParameterAbstract) {
int index = ((NakedObjectActionParameterAbstract) holder).Number;
i18nDescription = i18nManager.GetParameterDescription(identifier, index, original);
if (!staticFacets) {
return new DescribedAsFacetDynamicWrapI18n(i18nManager, holder, identifier, facet, index);
}
}
else {
i18nDescription = i18nManager.GetDescription(identifier, original);
if (!staticFacets) {
return new DescribedAsFacetDynamicWrapI18n(i18nManager, holder, identifier, facet);
}
}
return i18nDescription == null ? null : new DescribedAsFacetWrapI18n(i18nDescription, facet.FacetHolder);
}
开发者ID:radi4music,项目名称:NakedObjectsFramework,代码行数:20,代码来源:I18nFacetDecorator.cs
示例19: GetNamedFacet
private IFacet GetNamedFacet(IFacetHolder holder, INamedFacet facet, IIdentifier identifier) {
string original = (facet).Value ?? NameUtils.NaturalName(identifier.MemberName);
string i18nName;
if (holder is NakedObjectActionParameterAbstract) {
int index = ((NakedObjectActionParameterAbstract) holder).Number;
i18nName = i18nManager.GetParameterName(identifier, index, original);
if (!staticFacets) {
return new NamedFacetDynamicWrapI18n(i18nManager, holder, identifier, facet, index);
}
}
else {
i18nName = i18nManager.GetName(identifier, original);
if (!staticFacets) {
return new NamedFacetDynamicWrapI18n(i18nManager, holder, identifier, facet);
}
}
return i18nName == null ? null : new NamedFacetWrapI18n(i18nName, facet.FacetHolder);
}
开发者ID:radi4music,项目名称:NakedObjectsFramework,代码行数:20,代码来源:I18nFacetDecorator.cs
示例20: GetText
private string GetText(IIdentifier identifier, string type) {
string form = identifier.IsField ? Property : Action;
string key = identifier.ToIdentityString(IdentifierDepth.ClassNameParams) + ":" + form + "/" + type;
return GetText(key);
}
开发者ID:NakedObjectsGroup,项目名称:NakedObjectsFramework,代码行数:5,代码来源:I18NManager.cs
注:本文中的IIdentifier类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论