/// <summary>
        /// Creates a new instance of <see cref="DaprSecretStoreConfigurationProvider"/>.
        /// </summary>
        /// <param name="store">Dapr Secret Store name.</param>
        /// <param name="normalizeKey">Indicates whether any key delimiters should be replaced with the delimiter ":".</param>
        /// <param name="keyDelimiters">A collection of delimiters that will be replaced by ':' in the key of every secret.</param>
        /// <param name="secretDescriptors">The secrets to retrieve.</param>
        /// <param name="client">Dapr client used to retrieve Secrets</param>
        /// <param name="sidecarWaitTimeout">The <see cref="TimeSpan"/> used to configure the timeout waiting for Dapr.</param>
        public DaprSecretStoreConfigurationProvider(
            string store,
            bool normalizeKey,
            IList <string>?keyDelimiters,
            IEnumerable <DaprSecretDescriptor> secretDescriptors,
            DaprClient client,
            TimeSpan sidecarWaitTimeout)
        {
            ArgumentVerifier.ThrowIfNullOrEmpty(store, nameof(store));
            ArgumentVerifier.ThrowIfNull(secretDescriptors, nameof(secretDescriptors));
            ArgumentVerifier.ThrowIfNull(client, nameof(client));

            if (secretDescriptors.Count() == 0)
            {
                throw new ArgumentException("No secret descriptor was provided", nameof(secretDescriptors));
            }

            this.store              = store;
            this.normalizeKey       = normalizeKey;
            this.keyDelimiters      = keyDelimiters;
            this.secretDescriptors  = secretDescriptors;
            this.client             = client;
            this.sidecarWaitTimeout = sidecarWaitTimeout;
        }
 /// <summary>
 /// Adds the specified element to the queue
 /// </summary>
 /// <param name="element">The element to add.</param>
 public override void Add(TElement element)
 {
     ArgumentVerifier.CantBeNull(element, "element");
     _elements.Add(element);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DepthFirstSearchCrawler&lt;TVertex, TEdge&gt;"/> class.
 /// </summary>
 /// <param name="graphToCrawl">The graph to crawl.</param>
 /// <param name="detectCycles">if set to true, the crawler will notify derived classes that a cycle has been detected if the graph to crawl is a
 /// directed graph, as cycles in directed graphs influence algorithms which work with directed graphs.</param>
 protected DepthFirstSearchCrawler(GraphBase <TVertex, TEdge> graphToCrawl, bool detectCycles)
 {
     ArgumentVerifier.CantBeNull(graphToCrawl, "graphToCrawl");
     _graphToCrawl = graphToCrawl;
     _detectCycles = detectCycles;
 }
 /// <summary>
 /// Initializes a new instance of the PropertySpecEventArgs class.
 /// </summary>
 /// <param name="property">The PropertySpec that represents the property whose value is being requested or set.</param>
 /// <param name="val">The current value of the property.</param>
 public PropertySpecificationEventArgs(PropertySpecification property, object val)
 {
     ArgumentVerifier.CantBeNull(property, "property");
     this.Property = property;
     this.Value    = val;
 }
 public ClientPlatformSettings(string clientSecret, Guid aadClientId, bool isSandBoxEnv = false)
     : this(null, aadClientId, null, isSandBoxEnv, clientSecret, false)
 {
     ArgumentVerifier.ThrowOnNullOrEmptyString(clientSecret, "clientSecret");
 }
 public ClientPlatformSettings(Guid aadClientId, string appTokenCertThumbprint, bool isSandBoxEnv = false)
     : this(null, aadClientId, appTokenCertThumbprint, isSandBoxEnv, null, false)
 {
     ArgumentVerifier.ThrowOnNullOrEmptyString(appTokenCertThumbprint, "appTokenCertThumbprint");
 }
Ejemplo n.º 7
0
 public ClientPlatformSettings(string clientSecret, Guid aadClientId)
     : this(null, aadClientId, null, clientSecret, false)
 {
     ArgumentVerifier.ThrowOnNullOrEmptyString(clientSecret, nameof(clientSecret));
 }
Ejemplo n.º 8
0
 public ClientPlatformSettings(Guid aadClientId, string appTokenCertThumbprint)
     : this(null, aadClientId, appTokenCertThumbprint, null, false)
 {
     ArgumentVerifier.ThrowOnNullOrEmptyString(appTokenCertThumbprint, nameof(appTokenCertThumbprint));
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Determines whether this SubGraphView contains the passed in edge.
 /// </summary>
 /// <param name="edge">The edge.</param>
 /// <returns>
 /// true if the edge is in this SubGraphView, false otherwise.
 /// </returns>
 public bool Contains(TEdge edge)
 {
     ArgumentVerifier.CantBeNull(edge, "edge");
     return(PerformSyncedAction(() => _edges.Contains(edge)));
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Determines whether this SubGraphView contains the passed in vertex.
 /// </summary>
 /// <param name="vertex">The vertex.</param>
 /// <returns>true if the vertex is in this SubGraphView, false otherwise.
 /// </returns>
 public bool Contains(TVertex vertex)
 {
     ArgumentVerifier.CantBeNull(vertex, "vertex");
     return(PerformSyncedAction(() => _vertices.Contains(vertex)));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DisconnectedGraphsFinder&lt;TVertex, TEdge&gt;"/> class.
 /// </summary>
 /// <param name="subGraphViewCreatorFunc">The sub graph view creator func, used to create new subgraphview instances.</param>
 /// <param name="toCrawl">the graph to crawl</param>
 public DisconnectedGraphsFinder(Func <SubGraphView <TVertex, TEdge> > subGraphViewCreatorFunc, GraphBase <TVertex, TEdge> toCrawl)
     : base(toCrawl)
 {
     ArgumentVerifier.CantBeNull(subGraphViewCreatorFunc, "subGraphViewCreatorFunc");
     _subGraphViewCreatorFunc = subGraphViewCreatorFunc;
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Inserts the specified element into the heap at the right spot
 /// </summary>
 /// <param name="element">The element to insert.</param>
 public override void Insert(TElement element)
 {
     ArgumentVerifier.CantBeNull(element, "element");
     _elements.Add(element);
     Upheap(_elements.Count - 1);
 }
Ejemplo n.º 13
0
 public HomeController(IMemoryCache cache)
 {
     ArgumentVerifier.CantBeNull(cache, nameof(cache));
     _cache = cache;
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Determines whether this SubGraphView contains the passed in edge.
 /// </summary>
 /// <param name="edge">The edge.</param>
 /// <returns>
 /// true if the edge is in this SubGraphView, false otherwise.
 /// </returns>
 public bool Contains(TEdge edge)
 {
     ArgumentVerifier.CantBeNull(edge, "edge");
     return(_edges.Contains(edge));
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Determines whether this SubGraphView contains the passed in vertex.
 /// </summary>
 /// <param name="vertex">The vertex.</param>
 /// <returns>true if the vertex is in this SubGraphView, false otherwise.
 /// </returns>
 public bool Contains(TVertex vertex)
 {
     ArgumentVerifier.CantBeNull(vertex, "vertex");
     return(_vertices.Contains(vertex));
 }