本文整理汇总了C#中AccessRights类的典型用法代码示例。如果您正苦于以下问题:C# AccessRights类的具体用法?C# AccessRights怎么用?C# AccessRights使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AccessRights类属于命名空间,在下文中一共展示了AccessRights类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IotHubConnection
public IotHubConnection(IotHubConnectionString connectionString, AccessRights accessRights)
{
this.connectionString = connectionString;
this.accessRights = accessRights;
this.faultTolerantSession = new FaultTolerantAmqpObject<AmqpSession>(this.CreateSessionAsync, this.CloseConnection);
this.refreshTokenTimer = new IOThreadTimer(s => ((IotHubConnection)s).OnRefreshToken(), this, false);
}
示例2: BaseRole
public BaseRole(string sName, string sID, string sPath, AccessRights AccessRights)
{
_sName = sName;
_sID = sID;
_sPath = sPath;
_AccessRight = AccessRights;
}
示例3: ServiceBusQueueListenerFactory
public ServiceBusQueueListenerFactory(ServiceBusAccount account, string queueName, ITriggeredFunctionExecutor executor, AccessRights accessRights)
{
_namespaceManager = account.NamespaceManager;
_messagingFactory = account.MessagingFactory;
_queueName = queueName;
_executor = executor;
_accessRights = accessRights;
}
示例4: VKApiManager
public VKApiManager(int appId, AccessRights rights, bool xmlNeeded = true)
{
AuthorizationDetails details = new AuthorizationDetails();
details.appId = appId;
details.rights = rights;
IsXmlResponseNeeded = xmlNeeded;
status = Init(details);
}
示例5: AccessControl
/// <summary>
/// Initializes a new instance of the <see cref="MailKit.AccessControl"/> class.
/// </summary>
/// <remarks>
/// Creates a new <see cref="MailKit.AccessControl"/> with the given name and
/// access rights.
/// </remarks>
/// <param name="name">The identifier name.</param>
/// <param name="rights">The access rights.</param>
/// <exception cref="System.ArgumentNullException">
/// <paramref name="name"/> is <c>null</c>.
/// </exception>
public AccessControl (string name, IEnumerable<AccessRight> rights)
{
if (name == null)
throw new ArgumentNullException ("name");
Rights = new AccessRights (rights);
Name = name;
}
示例6: AccessControl
/// <summary>
/// Initializes a new instance of the <see cref="MailKit.AccessControl"/> class.
/// </summary>
/// <remarks>
/// Creates a new <see cref="MailKit.AccessControl"/> with the given name and
/// access rights.
/// </remarks>
/// <param name="name">The identifier name.</param>
/// <param name="rights">The access rights.</param>
/// <exception cref="System.ArgumentNullException">
/// <para><paramref name="name"/> is <c>null</c>.</para>
/// <para>-or-</para>
/// <para><paramref name="rights"/> is <c>null</c>.</para>
/// </exception>
public AccessControl (string name, string rights)
{
if (name == null)
throw new ArgumentNullException (nameof (name));
Rights = new AccessRights (rights);
Name = name;
}
示例7: CreateAsync_AccessRightsNotManage_DoesNotCreateQueue
public async Task CreateAsync_AccessRightsNotManage_DoesNotCreateQueue(AccessRights accessRights)
{
ServiceBusAccount account = new ServiceBusAccount();
Mock<ITriggeredFunctionExecutor> mockExecutor = new Mock<ITriggeredFunctionExecutor>(MockBehavior.Strict);
ServiceBusQueueListenerFactory factory = new ServiceBusQueueListenerFactory(account, "testqueue", mockExecutor.Object, accessRights);
IListener listener = await factory.CreateAsync(CancellationToken.None);
Assert.NotNull(listener);
}
示例8: ServiceBusSubscriptionListenerFactory
public ServiceBusSubscriptionListenerFactory(ServiceBusAccount account, string topicName, string subscriptionName, ITriggeredFunctionExecutor executor, AccessRights accessRights)
{
_namespaceManager = account.NamespaceManager;
_messagingFactory = account.MessagingFactory;
_topicName = topicName;
_subscriptionName = subscriptionName;
_executor = executor;
_accessRights = accessRights;
}
示例9: CreateAsync_AccessRightsNotManage_DoesNotCreateTopicOrSubscription
public async Task CreateAsync_AccessRightsNotManage_DoesNotCreateTopicOrSubscription(AccessRights accessRights)
{
ServiceBusAccount account = new ServiceBusAccount();
Mock<ITriggeredFunctionExecutor> mockExecutor = new Mock<ITriggeredFunctionExecutor>(MockBehavior.Strict);
ServiceBusSubscriptionListenerFactory factory = new ServiceBusSubscriptionListenerFactory(account, "testtopic", "testsubscription", mockExecutor.Object, accessRights, new ServiceBusConfiguration());
IListener listener = await factory.CreateAsync(CancellationToken.None);
Assert.NotNull(listener);
}
开发者ID:ConnorMcMahon,项目名称:azure-webjobs-sdk,代码行数:9,代码来源:ServiceBusSubscriptionListenerFactoryTests.cs
示例10: ServiceBusBinding
public ServiceBusBinding(string parameterName, IArgumentBinding<ServiceBusEntity> argumentBinding, ServiceBusAccount account, IBindableServiceBusPath path, AccessRights accessRights)
{
_parameterName = parameterName;
_argumentBinding = argumentBinding;
_account = account;
_namespaceName = ServiceBusClient.GetNamespaceName(account);
_path = path;
_accessRights = accessRights;
_converter = CreateConverter(account, path, accessRights);
}
示例11: AuthorizationDetails
/// <summary>
/// Констуктор по умолчанию.
/// </summary>
public AuthorizationDetails()
{
appId = -1;
secureKey = String.Empty;
rights = AccessRights.NO_RIGHTS;
userId = -1;
accessToken = String.Empty;
expiresIn = -1;
issuedTime = DateTime.MinValue;
}
示例12: ServiceBusTriggerBinding
public ServiceBusTriggerBinding(string parameterName, ITriggerDataArgumentBinding<BrokeredMessage> argumentBinding,
ServiceBusAccount account, string topicName, string subscriptionName, AccessRights accessRights)
{
_parameterName = parameterName;
_argumentBinding = argumentBinding;
_account = account;
_namespaceName = ServiceBusClient.GetNamespaceName(account);
_topicName = topicName;
_subscriptionName = subscriptionName;
_entityPath = SubscriptionClient.FormatSubscriptionPath(topicName, subscriptionName);
_accessRights = accessRights;
}
示例13: FixReferencedMemberAccess
private void FixReferencedMemberAccess(AccessRights memberAccessRights)
{
var declaration =
_highlighting.LessVisibleReferencedMember.DeclaredElement
.GetDeclarations().FirstOrDefault();
Contract.Assert(declaration != null);
ModifiersUtil.SetAccessRights(
declaration,
memberAccessRights);
}
示例14: MemberWithAccess
internal MemberWithAccess(IClrDeclaredElement declaredElement, AccessRights typeAccessRights,
MemberType memberType, AccessRights memberAccessRights)
{
Contract.Requires(declaredElement != null);
_declaredElement = declaredElement;
MemberName = declaredElement.ShortName;
TypeAccessRights = typeAccessRights;
MemberType = memberType;
_memberAccessRights = memberAccessRights;
}
示例15: AccessRightsToStringArray
public static string[] AccessRightsToStringArray(AccessRights accessRights)
{
var values = new List<string>(2);
foreach (AccessRights right in Enum.GetValues(typeof(AccessRights)))
{
if (accessRights.HasFlag(right))
{
values.Add(right.ToString());
}
}
return values.ToArray();
}