public CssBundleWatcherRoute(string name, IGuidFactory guidFactory, string relativePath, BundleWatcher watcher, IHttpRuntime httpRuntime, ISystemClock systemClock)
            : base(name, guidFactory, relativePath, watcher, httpRuntime)
        {
            systemClock.ThrowIfNull("systemClock");

            _systemClock = systemClock;
        }
        public IEnumerable<Routing.Route> GetRoutes(IGuidFactory guidFactory, IUrlResolver urlResolver, IHttpRuntime httpRuntime, string diagnosticsRelativeUrl, IEnumerable<IDiagnosticConfiguration> configurations)
        {
            guidFactory.ThrowIfNull("guidFactory");
            urlResolver.ThrowIfNull("urlResolver");
            diagnosticsRelativeUrl.ThrowIfNull("diagnosticsUrl");
            configurations.ThrowIfNull("configurations");

            string diagnosticsUrl = urlResolver.Absolute(diagnosticsRelativeUrl);

            yield return DiagnosticRouteHelper.Instance.GetViewRoute<DiagnosticsView>(
                "Diagnostics Home View",
                guidFactory,
                diagnosticsRelativeUrl,
                ResponseResources.Diagnostics,
                DiagnosticsViewNamespaces,
                httpRuntime,
                view =>
                    {
                        view.UrlResolver = urlResolver;
                        AddLinks(view, diagnosticsUrl, configurations);
                    });
            yield return DiagnosticRouteHelper.Instance.GetStylesheetRoute("Diagnostics Common CSS", guidFactory, diagnosticsRelativeUrl + "/css/common", ResponseResources.common, httpRuntime);
            yield return DiagnosticRouteHelper.Instance.GetStylesheetRoute("Diagnostics Reset CSS", guidFactory, diagnosticsRelativeUrl + "/css/reset", ResponseResources.reset, httpRuntime);
            yield return DiagnosticRouteHelper.Instance.GetJavaScriptRoute("Diagnostics jQuery JS", guidFactory, diagnosticsRelativeUrl + "/js/jquery", ResponseResources.jquery_1_8_2_min, httpRuntime);

            foreach (IDiagnosticConfiguration arg in configurations)
            {
                foreach (Routing.Route route in arg.GetRoutes(guidFactory, urlResolver, httpRuntime, diagnosticsRelativeUrl))
                {
                    yield return route;
                }
            }
        }
Esempio n. 3
0
        public Player(IGuidFactory guidFactory, Coordinate <int> coordinate)
        {
            guidFactory.ThrowIfNull(nameof(guidFactory));

            Id         = guidFactory.Random();
            Coordinate = coordinate;
        }
 public WsTrustEndpoint(Uri uri, WsTrustVersion version, ITimeService timeService = null, IGuidFactory guidFactory = null)
 {
     Uri          = uri;
     Version      = version;
     _timeService = timeService ?? new TimeService();
     _guidFactory = guidFactory ?? new GuidFactory();
 }
Esempio n. 5
0
 public void SetUp()
 {
     _guidFactory = MockRepository.GenerateMock<IGuidFactory>();
     _guidFactory.Stub(arg => arg.Random()).Return(Guid.Parse("78d15a5e-723b-4b2f-974e-58f6852b6584")).Repeat.Once();
     _guidFactory.Stub(arg => arg.Random()).Return(Guid.Parse("e16a5bdb-bc1b-4364-a03c-1d1cffaa1b13")).Repeat.Once();
     _mapper = new RandomIdMapper(_guidFactory);
 }
Esempio n. 6
0
		public DefaultManager(IAntiCsrfConfiguration configuration, IGuidFactory guidFactory)
		{
			configuration.ThrowIfNull("configuration");
			guidFactory.ThrowIfNull("guidFactory");

			_configuration = configuration;
			_guidFactory = guidFactory;
		}
        public IEnumerable<Routing.Route> GetRoutes(IGuidFactory guidFactory, IUrlResolver urlResolver, IHttpRuntime httpRuntime, string diagnosticsRelativeUrl, params IDiagnosticConfiguration[] configurations)
        {
            guidFactory.ThrowIfNull("guidFactory");
            diagnosticsRelativeUrl.ThrowIfNull("diagnosticsUrl");
            configurations.ThrowIfNull("configurations");

            return GetRoutes(guidFactory, urlResolver, httpRuntime, diagnosticsRelativeUrl, (IEnumerable<IDiagnosticConfiguration>)configurations);
        }
 /// <summary>
 /// Assign a new factory implementation
 /// </summary>
 /// <param name="factory">factory to use</param>
 /// <exception cref="System.ArgumentNullException">factory</exception>
 public static void Assign(IGuidFactory factory)
 {
     if (factory == null)
     {
         throw new ArgumentNullException("factory");
     }
     _instance = factory;
 }
Esempio n. 9
0
        public IEnumerable <Routing.Route> GetRoutes(IGuidFactory guidFactory, IUrlResolver urlResolver, IHttpRuntime httpRuntime, string diagnosticsRelativeUrl, params IDiagnosticConfiguration[] configurations)
        {
            guidFactory.ThrowIfNull("guidFactory");
            diagnosticsRelativeUrl.ThrowIfNull("diagnosticsUrl");
            configurations.ThrowIfNull("configurations");

            return(GetRoutes(guidFactory, urlResolver, httpRuntime, diagnosticsRelativeUrl, (IEnumerable <IDiagnosticConfiguration>)configurations));
        }
Esempio n. 10
0
        public DefaultManager(IAntiCsrfConfiguration configuration, IGuidFactory guidFactory)
        {
            configuration.ThrowIfNull("configuration");
            guidFactory.ThrowIfNull("guidFactory");

            _configuration = configuration;
            _guidFactory   = guidFactory;
        }
Esempio n. 11
0
        protected Route(string name, IGuidFactory guidFactory)
        {
            name.ThrowIfNull("name");
            guidFactory.ThrowIfNull("guidFactory");

            _name = name;
            _id   = guidFactory.Random();
        }
Esempio n. 12
0
 public UserService(IPasswordHasher passwordHasher, IUserRepository userRepository,
                    IGuidFactory guidFactory, IUserEntityFactory userEntityFactory)
 {
     this.passwordHasher    = passwordHasher;
     this.userRepository    = userRepository;
     this.guidFactory       = guidFactory;
     this.userEntityFactory = userEntityFactory;
 }
Esempio n. 13
0
 public void SetUp()
 {
     _testContext = new ExpandoObject();
     _testContext.Exception = null;
     _guidFactory = MockRepository.GenerateMock<IGuidFactory>();
     _registrationRepository = MockRepository.GenerateMock<IRegistrationRepository>();
     _sut = new RegistrationService(_guidFactory, _registrationRepository);
     _request = new Registration();
 }
Esempio n. 14
0
 public TempFileFactory(
     IFileService fileService,
     IPathService pathService,
     IGuidFactory guidFactory)
 {
     _fileService = fileService ?? throw new ArgumentNullException(nameof(fileService));
     _pathService = pathService ?? throw new ArgumentNullException(nameof(pathService));
     _guidFactory = guidFactory ?? throw new ArgumentNullException(nameof(guidFactory));
 }
Esempio n. 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ComponentryContainer"/> class.
 /// </summary>
 /// <param name="clock">The container clock.</param>
 /// <param name="guidFactory">The container GUID factory.</param>
 /// <param name="loggerFactory">The container logger factory.</param>
 public ComponentryContainer(
     IZonedClock clock,
     IGuidFactory guidFactory,
     ILoggerFactory loggerFactory)
 {
     this.Clock         = clock;
     this.GuidFactory   = guidFactory;
     this.LoggerFactory = loggerFactory;
 }
Esempio n. 16
0
 public GuidFunctionTokenizer(IGuidFactory GuidFactory)
 {
     if (GuidFactory == null)
     {
         throw new ArgumentNullException("GuidFactory");
     }
     this.guidFactory = GuidFactory;
     this.guidRegex   = new Regex(@"__GUID\(([A-Za-z]?)\)__", RegexOptions.Compiled);
 }
Esempio n. 17
0
 public CorrelationIdMiddleware(
     RequestDelegate next,
     ICorrelationIdSetter correlationIdSetter,
     IGuidFactory guidFactory)
 {
     _next = next ?? throw new ArgumentNullException(nameof(next));
     _correlationIdSetter = correlationIdSetter ?? throw new ArgumentNullException(nameof(correlationIdSetter));
     _guidFactory         = guidFactory ?? throw new ArgumentNullException(nameof(guidFactory));
 }
Esempio n. 18
0
 public TasksRepository(
     IGuidFactory guidFactory,
     IDateTimeProvider dateTimeProvider,
     IDbTmRepository <DbTask> taskRepositoryRepository)
 {
     _guidFactory      = guidFactory;
     _dateTimeProvider = dateTimeProvider;
     _taskRepository   = taskRepositoryRepository;
 }
Esempio n. 19
0
        public Route(string name, IGuidFactory guidFactory, string resolvedRelativeUrl)
        {
            name.ThrowIfNull("name");
            guidFactory.ThrowIfNull("guidFactory");
            resolvedRelativeUrl.ThrowIfNull("resolvedRelativeUrl");

            _name = name;
            _id   = guidFactory.Random();
            _resolvedRelativeUrl = resolvedRelativeUrl;
        }
Esempio n. 20
0
        public Board(IGuidFactory guidFactory, World world, Coordinate <int> coordinate, Size <int> size)
        {
            guidFactory.ThrowIfNull(nameof(guidFactory));
            _world = world.EnsureNotNull(nameof(world));

            Id           = guidFactory.Random();
            Coordinate   = coordinate;
            Size         = size;
            _boardLayers = new BoardLayerCollection <BoardLayer>(() => new BoardLayer(size));
        }
        public override void SetUp()
        {
            base.SetUp();

            passwordHasher    = NewMock <IPasswordHasher>();
            userRepository    = NewMock <IUserRepository>();
            guidFactory       = NewMock <IGuidFactory>();
            userEntityFactory = NewMock <IUserEntityFactory>();
            userService       = new UserService(passwordHasher, userRepository, guidFactory, userEntityFactory);
        }
 public EngineeringLibraryBuilderExecuter(IProcessManager processManager, IFileSystem fileSystem,
                                          IGuidFactory guidFactory, IBinariesLocator binariesLocator,
                                          ICMakeConversation cmakeConversation, ExecutionContext executionContext)
 {
     this.processManager    = processManager;
     this.fileSystem        = fileSystem;
     this.guidFactory       = guidFactory;
     this.binariesLocator   = binariesLocator;
     this.cmakeConversation = cmakeConversation;
     this.executionContext  = executionContext;
 }
Esempio n. 23
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Component"/> class.
        /// </summary>
        /// <param name="container">The components componentry container.</param>
        /// <param name="subName">The sub-name for the component.</param>
        protected Component(IComponentryContainer container, string subName)
        {
            this.clock       = container.Clock;
            this.guidFactory = container.GuidFactory;

            this.Name   = new Label($"{this.GetType().NameFormatted()}{SetSubName(subName)}");
            this.Logger = container.LoggerFactory.CreateLogger(this.Name.Value);

            this.InitializedTime = this.clock.TimeNow();
            this.Logger.LogDebug(LogId.Component, "Initialized.");
        }
        public Routing.Route GetJavaScriptRoute(string name, IGuidFactory guidFactory, string resolvedRelativeUrl, string javaScript, IHttpRuntime httpRuntime)
        {
            guidFactory.ThrowIfNull("guidFactory");
            resolvedRelativeUrl.ThrowIfNull("resolvedRelativeUrl");
            javaScript.ThrowIfNull("javaScript");

            return(new Routing.Route(name, guidFactory.Random(), resolvedRelativeUrl)
                   .RestrictByMethods(HttpMethod.Get)
                   .RestrictByUrlRelativePath(resolvedRelativeUrl, CaseInsensitivePlainComparer.Instance, httpRuntime)
                   .RespondWith(context => new JavaScriptResponse(javaScript)));
        }
		public DefaultGenerator(IAntiCsrfConfiguration configuration, IAntiCsrfNonceRepository nonceRepository, IGuidFactory guidFactory, ISystemClock systemClock)
		{
			configuration.ThrowIfNull("configuration");
			nonceRepository.ThrowIfNull("nonceRepository");
			guidFactory.ThrowIfNull("guidFactory");
			systemClock.ThrowIfNull("systemClock");

			_configuration = configuration;
			_nonceRepository = nonceRepository;
			_guidFactory = guidFactory;
			_systemClock = systemClock;
		}
Esempio n. 26
0
        public DefaultGenerator(IAntiCsrfConfiguration configuration, IAntiCsrfNonceRepository nonceRepository, IGuidFactory guidFactory, ISystemClock systemClock)
        {
            configuration.ThrowIfNull("configuration");
            nonceRepository.ThrowIfNull("nonceRepository");
            guidFactory.ThrowIfNull("guidFactory");
            systemClock.ThrowIfNull("systemClock");

            _configuration   = configuration;
            _nonceRepository = nonceRepository;
            _guidFactory     = guidFactory;
            _systemClock     = systemClock;
        }
Esempio n. 27
0
 public UserRepository(
     Lazy <IDbContext> dbContextLazy,
     IGuidFactory guidFactory,
     IMapper mapper,
     IHashComputer hashComputer,
     IClaimContext <UserClaim> claimContext) : base(dbContextLazy)
 {
     this.guidFactory  = guidFactory;
     this.mapper       = mapper;
     this.hashComputer = hashComputer;
     this.claimContext = claimContext;
 }
        protected BundleWatcherRoute(string name, IGuidFactory guidFactory, string relativePath, BundleWatcher watcher, IHttpRuntime httpRuntime)
            : base(name, guidFactory)
        {
            relativePath.ThrowIfNull("relativePath");
            watcher.ThrowIfNull("watcher");
            httpRuntime.ThrowIfNull("httpRuntime");

            _relativePath           = relativePath;
            _watcher                = watcher;
            _httpRuntime            = httpRuntime;
            _watcher.BundleChanged += WatcherBundleChanged;
            ConfigureRoute();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DicomAzureFunctionsClient"/> class.
 /// </summary>
 /// <param name="durableClientFactory">The client for interacting with durable functions.</param>
 /// <param name="urlResolver">A helper for building URLs for other APIs.</param>
 /// <param name="extendedQueryTagStore">An extended query tag store for resolving the query tag IDs.</param>
 /// <param name="guidFactory">A factory for creating instances of <see cref="Guid"/>.</param>
 /// <param name="logger">A logger for diagnostic information.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="durableClientFactory"/>, <paramref name="urlResolver"/>,
 /// <paramref name="extendedQueryTagStore"/>, <paramref name="guidFactory"/> is <see langword="null"/>.
 /// </exception>
 public DicomAzureFunctionsClient(
     IDurableClientFactory durableClientFactory,
     IExtendedQueryTagStore extendedQueryTagStore,
     IUrlResolver urlResolver,
     IGuidFactory guidFactory,
     ILogger <DicomAzureFunctionsClient> logger)
 {
     _durableClient         = EnsureArg.IsNotNull(durableClientFactory, nameof(durableClientFactory)).CreateClient();
     _urlResolver           = EnsureArg.IsNotNull(urlResolver, nameof(urlResolver));
     _extendedQueryTagStore = EnsureArg.IsNotNull(extendedQueryTagStore, nameof(extendedQueryTagStore));
     _guidFactory           = EnsureArg.IsNotNull(guidFactory, nameof(guidFactory));
     _logger = EnsureArg.IsNotNull(logger, nameof(logger));
 }
        public Routing.Route GetViewRoute <T>(string name, IGuidFactory guidFactory, string resolvedRelativeUrl, byte[] viewTemplate, IEnumerable <string> namespaces, IHttpRuntime httpRuntime, Action <T> populateView = null)
            where T : View
        {
            guidFactory.ThrowIfNull("guidFactory");
            resolvedRelativeUrl.ThrowIfNull("resolvedRelativeUrl");
            viewTemplate.ThrowIfNull("viewTemplate");
            namespaces.ThrowIfNull("namespaces");

            return(new Routing.Route(name, guidFactory.Random(), resolvedRelativeUrl)
                   .RestrictByMethods(HttpMethod.Get)
                   .RestrictByUrlRelativePath(resolvedRelativeUrl, CaseInsensitivePlainComparer.Instance, httpRuntime)
                   .RespondWith(context => GetViewResponse(viewTemplate, namespaces, populateView)));
        }
        public NewWorldController(INewWorldView view, IConfigFile <Config> configFile, IGuidFactory guidFactory, ISystemClock systemClock)
            : base(view)
        {
            _configFile  = configFile.EnsureNotNull(nameof(configFile));
            _guidFactory = guidFactory.EnsureNotNull(nameof(guidFactory));
            _systemClock = systemClock.EnsureNotNull(nameof(systemClock));
            _viewModel   = new NewWorldViewModel
            {
                Author   = _configFile.Config.Views.NewWorld.DefaultAuthor,
                IdAsGuid = _guidFactory.Random(),
                Version  = "1.0"
            };

            AddDisposables(View.IdGenerationRequested.Subscribe(x => _viewModel.IdAsGuid = _guidFactory.Random()));
        }
        public IEnumerable<Route> GetRoutes(IGuidFactory guidFactory, IUrlResolver urlResolver, IHttpRuntime httpRuntime, string diagnosticsRelativeUrl)
        {
            guidFactory.ThrowIfNull("guidFactory");
            urlResolver.ThrowIfNull("urlResolver");
            diagnosticsRelativeUrl.ThrowIfNull("diagnosticsUrl");

            yield return DiagnosticRouteHelper.Instance.GetViewRoute<RouteTableView>(
                "Diagnostics Route Table View",
                guidFactory,
                diagnosticsRelativeUrl + "/route_table",
                ResponseResources.RouteTable,
                RouteTableViewNamespaces,
                httpRuntime,
                view => view.Populate(urlResolver, _routes.Value, diagnosticsRelativeUrl));
            yield return DiagnosticRouteHelper.Instance.GetStylesheetRoute("Diagnostics Route Table View CSS", guidFactory, diagnosticsRelativeUrl + "/route_table/css", ResponseResources.route_table_view, httpRuntime);
        }
        public IEnumerable <Route> GetRoutes(IGuidFactory guidFactory, IUrlResolver urlResolver, IHttpRuntime httpRuntime, string diagnosticsRelativeUrl)
        {
            guidFactory.ThrowIfNull("guidFactory");
            urlResolver.ThrowIfNull("urlResolver");
            diagnosticsRelativeUrl.ThrowIfNull("diagnosticsUrl");

            yield return(DiagnosticRouteHelper.Instance.GetViewRoute <RouteTableView>(
                             "Diagnostics Route Table View",
                             guidFactory,
                             diagnosticsRelativeUrl + "/route_table",
                             ResponseResources.RouteTable,
                             RouteTableViewNamespaces,
                             httpRuntime,
                             view => view.Populate(urlResolver, _routes.Value, diagnosticsRelativeUrl)));

            yield return(DiagnosticRouteHelper.Instance.GetStylesheetRoute("Diagnostics Route Table View CSS", guidFactory, diagnosticsRelativeUrl + "/route_table/css", ResponseResources.route_table_view, httpRuntime));
        }
        public DicomAzureFunctionsClientTests()
        {
            IDurableClientFactory durableClientFactory = Substitute.For <IDurableClientFactory>();

            _durableClient = Substitute.For <IDurableClient>();
            durableClientFactory.CreateClient().Returns(_durableClient);

            _extendedQueryTagStore = Substitute.For <IExtendedQueryTagStore>();
            _urlResolver           = Substitute.For <IUrlResolver>();
            _guidFactory           = Substitute.For <IGuidFactory>();
            _client = new DicomAzureFunctionsClient(
                durableClientFactory,
                _extendedQueryTagStore,
                _urlResolver,
                _guidFactory,
                NullLogger <DicomAzureFunctionsClient> .Instance);
        }
Esempio n. 35
0
 public UserEndpoint(
     ILoggerFactory log,
     IExceptionFilter exceptionFilter,
     IAuthentication auth,
     IConsentStore consentStore,
     IVendorClient vendorClient,
     IFhirClient fhirClient,
     IUserFactory userFactory,
     IGuidFactory guidFactory)
 {
     this.log             = log.CreateLogger <UserEndpoint>();
     this.exceptionFilter = exceptionFilter;
     this.auth            = auth;
     this.consentStore    = consentStore;
     this.vendorClient    = vendorClient;
     this.fhirClient      = fhirClient;
     this.userFactory     = userFactory;
     this.guidFactory     = guidFactory;
 }
        public IEnumerable<Routing.Route> GetRoutes(IGuidFactory guidFactory, IUrlResolver urlResolver, IHttpRuntime httpRuntime, string diagnosticsRelativeUrl)
        {
            guidFactory.ThrowIfNull("guidFactory");
            urlResolver.ThrowIfNull("urlResolver");
            httpRuntime.ThrowIfNull("httpRuntime");
            diagnosticsRelativeUrl.ThrowIfNull("diagnosticsUrl");

            yield return DiagnosticRouteHelper.Instance.GetViewRoute<AspNetView>(
                "Diagnostics ASP.net View",
                guidFactory,
                diagnosticsRelativeUrl + "/asp_net",
                ResponseResources.AspNet,
                AspNetViewNamespaces,
                httpRuntime,
                view =>
                    {
                        view.UrlResolver = urlResolver;
                        view.Populate(_cacheType, _responseGeneratorTypes, _responseHandlerTypes);
                    });
            yield return DiagnosticRouteHelper.Instance.GetStylesheetRoute("Diagnostics ASP.net View CSS", guidFactory, diagnosticsRelativeUrl + "/asp_net/css", ResponseResources.asp_net_view, httpRuntime);
        }
Esempio n. 37
0
 public Jobs(
     ILoggerFactory log,
     IExceptionFilter exceptionFilter,
     IFhirClient fhirClient,
     IJson json,
     IWithingsClient withingsClient,
     IConsentStore consentStore,
     INotification notification,
     IGuidFactory guidFactory,
     IWithingsToFhirConverter converter)
 {
     this.log             = log.CreateLogger <Jobs>();
     this.exceptionFilter = exceptionFilter;
     this.fhirClient      = fhirClient;
     this.json            = json;
     this.withingsClient  = withingsClient;
     this.consentStore    = consentStore;
     this.notification    = notification;
     this.guidFactory     = guidFactory;
     this.converter       = converter;
 }
        public void GivenNullArguments_WhenConstructing_ThenThrowArgumentNullException()
        {
            IDurableClientFactory  durableClientFactory  = Substitute.For <IDurableClientFactory>();
            IExtendedQueryTagStore extendedQueryTagStore = Substitute.For <IExtendedQueryTagStore>();
            IUrlResolver           urlResolver           = Substitute.For <IUrlResolver>();
            IGuidFactory           guidFactory           = Substitute.For <IGuidFactory>();

            Assert.Throws <ArgumentNullException>(
                () => new DicomAzureFunctionsClient(null, extendedQueryTagStore, urlResolver, guidFactory, NullLogger <DicomAzureFunctionsClient> .Instance));

            Assert.Throws <ArgumentNullException>(
                () => new DicomAzureFunctionsClient(durableClientFactory, null, urlResolver, guidFactory, NullLogger <DicomAzureFunctionsClient> .Instance));

            Assert.Throws <ArgumentNullException>(
                () => new DicomAzureFunctionsClient(durableClientFactory, extendedQueryTagStore, null, guidFactory, NullLogger <DicomAzureFunctionsClient> .Instance));

            Assert.Throws <ArgumentNullException>(
                () => new DicomAzureFunctionsClient(durableClientFactory, extendedQueryTagStore, urlResolver, null, NullLogger <DicomAzureFunctionsClient> .Instance));

            Assert.Throws <ArgumentNullException>(
                () => new DicomAzureFunctionsClient(durableClientFactory, extendedQueryTagStore, urlResolver, guidFactory, null));
        }
Esempio n. 39
0
        public RandomIdMapper(IGuidFactory guidFactory)
        {
            guidFactory.ThrowIfNull("guidFactory");

            _guidFactory = guidFactory;
        }
        public RandomGuidBuilder(IGuidFactory guidFactory)
        {
            guidFactory.ThrowIfNull("guidFactory");

            _guidFactory = guidFactory;
        }
		/// <summary>
		/// Initializes a new instance of the <see cref="EntityIdFactory"/> class.
		/// </summary>
		/// <param name="guidFactory">A GUID factory.</param>
		/// <exception cref="ArgumentNullException">Thrown when <paramref name="guidFactory"/> is null.</exception>
		public EntityIdFactory(IGuidFactory guidFactory)
		{
			guidFactory.ThrowIfNull("guidFactory");

			_guidFactory = guidFactory;
		}
Esempio n. 42
0
 /// <summary>
 /// Assign a new factory implementation
 /// </summary>
 /// <param name="factory">factory to use</param>
 /// <exception cref="System.ArgumentNullException">factory</exception>
 public static void Assign(IGuidFactory factory)
 {
     if (factory == null) throw new ArgumentNullException("factory");
     _instance = factory;
 }
Esempio n. 43
0
 public GoalFactory(IGuidFactory guidFactory)
 {
     this.guidFactory = guidFactory;
 }
Esempio n. 44
0
 public void SetUp()
 {
     _name = "name";
     _id = Guid.Parse("2fa8d2d3-94ca-4c43-8dd0-50717c165c1f");
     _guidFactory = MockRepository.GenerateMock<IGuidFactory>();
     _guidFactory.Stub(arg => arg.Random()).Return(_id);
     _resolvedRelativeUrl = "resolved";
     _route = new Route.Routing.Route(_name, _guidFactory, _resolvedRelativeUrl);
 }