当前位置: 首页>>代码示例>>C#>>正文


C# Brand.AssignPortIds方法代码示例

本文整理汇总了C#中Brand.AssignPortIds方法的典型用法代码示例。如果您正苦于以下问题:C# Brand.AssignPortIds方法的具体用法?C# Brand.AssignPortIds怎么用?C# Brand.AssignPortIds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Brand的用法示例。


在下文中一共展示了Brand.AssignPortIds方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetUpData

        private void SetUpData()
        {
            Domain.Dependencies.Register();

            //Repository registration
            DIContainer.Instance.RegisterType<IRepository, OnlineRepository>(OnlineRepository.InstanceName);
            DIContainer.Instance.RegisterType<ReferenceDataRepository>(new ContainerControlledLifetimeManager());
            DIContainer.Instance.RegisterType<IComponentSettingsClient, ComponentSettingsClientTest>();

            var workStation = DIContainer.Instance.Resolve<Workstation>();
            workStation.ConfigurationServiceBaseAddress = "http://Localhost/";
            workStation.Ship = new Ship { ShipId = "1", BrandId = "3", Code = "3" };
            workStation.ConnectionMode = ConnectionMode.Online;
            var intCollection = new Collection<int>();
            intCollection.Add(1);
            intCollection.Add(2);
            intCollection.Add(3);
            var brand = new Brand { BrandId = "3", Name = "Carnival Breeze", MediaItemAddress = "http://172.26.248.122/ImagingMediaService/MediaItems/23" };
            brand.AssignPortIds(intCollection);
            workStation.Brand = brand;
            workStation.Voyage = new Voyage { IsActive = true, VoyageId = "31", Number = "dd0", ShipId = "1" };
            var voyages = new List<Voyage>();
            voyages.Add(new Voyage { IsActive = true, VoyageId = "31", Number = "dd0", ShipId = "1" });
            workStation.AssignVoyageList(voyages);

            this.targetRepository = new ConfigurationServiceRepository();
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:27,代码来源:ConfigurationServiceRepositoryTest.cs

示例2: SetupData

        /// <summary>
        /// Setups the data.
        /// </summary>
        private void SetupData()
        {
            // Repository registration
            Domain.Dependencies.Register();
            DataAccess.Dependencies.Register();

            Workstation ws = DIContainer.Instance.Resolve<Workstation>();

            ws.Port = new Port { PortId = "1" };
            ws.Ship = new Ship { ShipId = "1" };
            ws.GangwayLocation = new GangwayLocation { LocationId = "1" };
            ws.GangwayServiceBaseAddress = "http://Localhost/";
            ws.ConfigurationServiceBaseAddress = "http://Localhost/";
            ws.AuthenticationServiceBaseAddress = "http://Localhost/";
            ws.AuthorizationServiceBaseAddress = "http://Localhost/";
            ws.User.UserFullName = "DC-Dev60";
            ws.ConnectionMode = ConnectionMode.Online;
            this.intCollection = new Collection<int>();
            intCollection.Add(0);
            var brand = new Brand { BrandId = "3", Name = "Carnival Breeze", MediaItemAddress = "http://172.26.248.122/ImagingMediaService/MediaItems/23" };
            brand.AssignPortIds(intCollection);
            ws.Brand = brand;
            this.workStation = ws;

            this.repository = new Mock<GangwayEventRepository>();
            this.embarkationStatisticsRepositoryMock = new Mock<EmbarkationStatisticsRepository>();
            this.personServiceRepositoryMock = new Mock<PersonServiceRepository>();
            this.photoCaptureRepositoryMock = new Mock<PhotoCaptureRepository>();
            this.shipTimeRepositoryMock = new Mock<ShipTimeRepository>();
            this.referenceDataRepositoryMock = new Mock<ReferenceDataRepository>();
            this.gangwayEventRepositoryMock = new Mock<GangwayEventRepository>();

            DIContainer.Instance.RegisterType<IPersonsClient, PersonsClientTest>();
            DIContainer.Instance.RegisterType<IGuestClient, GuestClientTest>();

            DIContainer.Instance.RegisterInstance<GangwayEventRepository>(this.repository.Object);
            ////DIContainer.Instance.RegisterInstance<ReferenceDataRepository>(this.referenceDataRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<EmbarkationStatisticsRepository>(this.embarkationStatisticsRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<GangwayEventRepository>(this.gangwayEventRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<PhotoCaptureRepository>(this.photoCaptureRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<PersonServiceRepository>(this.personServiceRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<ShipTimeRepository>(this.shipTimeRepositoryMock.Object);
            var boardingDetail = new BoardingDetail
            {
                GangwayLocation = "location",
                MachineName = "GWY terminal",
                PortName = "port",
                ShipId = "1",
                Status = "onboard",
                StatusTypeId = "1",
                UserId = "1"
            };
            var personEvent = new PersonEvent { PersonId = "123", ApplicationId = "1" };
            this.repository.Setup(a => a.CreateEventAsync(personEvent)).Returns(Task.FromResult("Successful"));
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:58,代码来源:PersonBoardingServiceTest.cs

示例3: SetupData

        /// <summary>
        /// Setups the data.
        /// </summary>
        private void SetupData()
        {
            Domain.Dependencies.Register();
            DataAccess.Dependencies.Register();

            Workstation ws = DIContainer.Instance.Resolve<Workstation>();

            ws.Port = new Port { PortId = "1" };
            ws.Ship = new Ship { ShipId = "1" };
            ws.GangwayLocation = new GangwayLocation { LocationId = "1" };
            ws.GangwayServiceBaseAddress = "http://Localhost/";
            ws.ConnectionMode = ConnectionMode.Online;
            ws.ConfigurationServiceBaseAddress = "http://Localhost/";
            ws.AuthenticationServiceBaseAddress = "http://Localhost/";
            ws.AuthorizationServiceBaseAddress = "http://Localhost/";
            var intCollection = new Collection<int>();
            intCollection.Add(0);
            var brand = new Brand { BrandId = "3", Name = "Carnival Breeze", MediaItemAddress = "http://172.26.248.122/ImagingMediaService/MediaItems/23" };
            brand.AssignPortIds(intCollection);
            ws.Brand = brand;

            ////this.repository = new Mock<IRepository>();
            ////this.embarkationStatisticsRepositoryMock = new Mock<EmbarkationStatisticsRepository>();
            ////this.personServiceRepositoryMock = new Mock<PersonServiceRepository>();
            ////this.photoCaptureRepositoryMock = new Mock<PhotoCaptureRepository>();
            ////this.shipTimeRepositoryMock = new Mock<ShipTimeRepository>();
            this.referenceDataRepositoryMock = new Mock<ReferenceDataRepository>();
            ////this.gangwayEventRepositoryMock = new Mock<GangwayEventRepository>();
            ////this.referenceDataClient = new Mock<IReferenceDataClient>();
            ////this.shipClient = new Mock<IShipClient>();

            ////DIContainer.Instance.RegisterInstance<IReferenceDataClient>(this.referenceDataClient.Object);
            ////DIContainer.Instance.RegisterInstance<IShipClient>(this.shipClient.Object);

            ////DIContainer.Instance.RegisterInstance<IRepository>(this.repository.Object);
            DIContainer.Instance.RegisterInstance<ReferenceDataRepository>(this.referenceDataRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<EmbarkationStatisticsRepository>(this.embarkationStatisticsRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<GangwayEventRepository>(this.gangwayEventRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<PhotoCaptureRepository>(this.photoCaptureRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<PersonServiceRepository>(this.personServiceRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<ShipTimeRepository>(this.shipTimeRepositoryMock.Object);
            this.service = new ReferenceDataService();
            this.referenceDataRepositoryMock.Setup(data => data.RetrieveReferenceDataAsync()).Returns(Task.FromResult(this.referenceData));
            this.referenceDataRepositoryMock.Setup(data => data.RetrieveShipInfoAsync("5", false)).Returns(Task.FromResult(this.shipInfo));
            this.referenceDataRepositoryMock.Setup(data => data.RetrieveShipListAsync("3", "5", "1")).Returns(Task.FromResult(this.shipList));
            ////var referenceData = @"{""Countries"":[{""CountryId"":""1"",""Code"":""AF"",""Name"":""Afghanistan"",""CountryFlagAddress"":""http://devweb03.decurtis.com/ImagingMediaService/MediaItems/1""}]}";

            ////this.referenceDataClient.Setup(data => data.RetrieveReferenceDataAsync()).Returns(Task.FromResult(referenceData));
            ////this.referenceDataClient.Setup(data => data.RetrieveShipInfoAsync("5")).Returns(Task.FromResult(@"{""PreviousPageAddress"":null,""NextPageAddress"":null,""Items"":[{""ShipId"":""5"",""BrandId"":""3"",""Code"":""H6403"",""Name"":""Carnival Breeze"",""MediaItemAddress"":""http://devweb03.decurtis.com/ImagingMediaService/MediaItems/304004""}],""TotalResults"":1}"));

            ////this.shipClient.Setup(data => data.RetrieveShipListAsync(It.IsNotNull<string>(), It.IsAny<string>(), It.IsAny<string>(), 0, 0)).Returns(this.RetrieveShipAsync());
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:55,代码来源:ReferenceDataServiceTest.cs

示例4: SetupData

        /// <summary>
        /// Setups the data.
        /// </summary>
        private void SetupData()
        {
            Domain.Dependencies.Register();
            DataAccess.Dependencies.Register();

            Workstation ws = DIContainer.Instance.Resolve<Workstation>();

            ws.Port = new Port { PortId = "1" };
            ws.Ship = new Ship { ShipId = "1" };
            ws.GangwayLocation = new GangwayLocation { LocationId = "1" };
            ws.GangwayServiceBaseAddress = "http://Localhost/";
            ws.ConfigurationServiceBaseAddress = "http://Localhost/";
            ws.AuthenticationServiceBaseAddress = "http://Localhost/";
            ws.AuthorizationServiceBaseAddress = "http://Localhost/";
            ws.ConnectionMode = ConnectionMode.Online;
            ws.GangwayServiceBaseAddress = "http://Localhost/";
            ws.ConfigurationServiceBaseAddress = "http://Localhost/";
            ws.AuthenticationServiceBaseAddress = "http://Localhost/";
            ws.AuthorizationServiceBaseAddress = "http://Localhost/";
            var intCollection = new Collection<int>();
            intCollection.Add(0);
            var brand = new Brand { BrandId = "3", Name = "Carnival Breeze", MediaItemAddress = "http://172.26.248.122/ImagingMediaService/MediaItems/23" };
            brand.AssignPortIds(intCollection);
            ws.Brand = brand;

            this.embarkationStatistics = new EmbarkationStatistics { CrewEmbarkation = new CrewEmbarkStats { Ashore = 100, SignIn = 50, DebarkingToday = 50, ExpectedToday = 150, Onboard = 100, TotalOccupancy = 500 }, GuestEmbarkation = new GuestEmbarkStats { Ashore = 100, CheckedIn = 400, DebarkingToday = 140, ExpectedToday = 400, NotCheckedIn = 200, Onboard = 100, TotalOccupancy = 300 }, VisitorEmbarkation = new VisitorEmbarkStats { ExpectedToday = 100, Onboard = 50 }, CurrentBoardingNumber = 8 };
            embarkationStatistics.AssignCountryEmbarkStats(intCollection);

            this.repository = new Mock<IRepository>();
            this.embarkationStatisticsRepositoryMock = new Mock<EmbarkationStatisticsRepository>();
            this.personServiceRepositoryMock = new Mock<PersonServiceRepository>();
            this.photoCaptureRepositoryMock = new Mock<PhotoCaptureRepository>();
            this.shipTimeRepositoryMock = new Mock<ShipTimeRepository>();
            this.referenceDataRepositoryMock = new Mock<ReferenceDataRepository>();
            this.gangwayEventRepositoryMock = new Mock<GangwayEventRepository>();
            this.embarkationStatisticsClient = new Mock<IEmbarkationStatisticsClient>();

            DIContainer.Instance.RegisterInstance<IEmbarkationStatisticsClient>(this.embarkationStatisticsClient.Object);

            DIContainer.Instance.RegisterInstance<IRepository>(this.repository.Object);
            DIContainer.Instance.RegisterInstance<ReferenceDataRepository>(this.referenceDataRepositoryMock.Object);
            DIContainer.Instance.RegisterInstance<EmbarkationStatisticsRepository>(this.embarkationStatisticsRepositoryMock.Object);
            DIContainer.Instance.RegisterInstance<GangwayEventRepository>(this.gangwayEventRepositoryMock.Object);
            DIContainer.Instance.RegisterInstance<PhotoCaptureRepository>(this.photoCaptureRepositoryMock.Object);
            DIContainer.Instance.RegisterInstance<PersonServiceRepository>(this.personServiceRepositoryMock.Object);
            DIContainer.Instance.RegisterInstance<ShipTimeRepository>(this.shipTimeRepositoryMock.Object);

            this.embarkationStatisticsRepositoryMock.Setup(data => data.RetrieveEmbarkationStatisticsAsync(It.IsNotNull<string>(), It.IsAny<string>(), It.IsAny<string>())).Returns(Task.FromResult(this.embarkationStatistics));
            ////this.embarkationStatisticsClient.Setup(data => data.RetrieveEmbarkationStatisticsAsync(It.IsNotNull<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>())).Returns(Task.FromResult("{CurrentBoardingNumber:8}"));
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:53,代码来源:EmbarkationStatisticsServiceTest.cs

示例5: SetupData

        /// <summary>
        /// Setups the data.
        /// </summary>
        private void SetupData()
        {
            Domain.Dependencies.Register();
            DataAccess.Dependencies.Register();

            Workstation ws = DIContainer.Instance.Resolve<Workstation>();

            ws.Port = new Port { PortId = "1" };
            ws.Ship = new Ship { ShipId = "1" };
            ws.GangwayLocation = new GangwayLocation { LocationId = "1" };
            ws.GangwayServiceBaseAddress = "http://Localhost/";
            ws.ConfigurationServiceBaseAddress = "http://Localhost/";
            ws.AuthenticationServiceBaseAddress = "http://Localhost/";
            ws.AuthorizationServiceBaseAddress = "http://Localhost/";
            ws.ConnectionMode = ConnectionMode.Online;
            var intCollection = new Collection<int>();
            intCollection.Add(0);
            var brand = new Brand { BrandId = "3", Name = "Carnival Breeze", MediaItemAddress = "http://172.26.248.122/ImagingMediaService/MediaItems/23" };
            brand.AssignPortIds(intCollection);
            ws.Brand = brand;

            ////this.repository = new Mock<IRepository>();
            ////this.embarkationStatisticsRepositoryMock = new Mock<EmbarkationStatisticsRepository>();
            ////this.personServiceRepositoryMock = new Mock<PersonServiceRepository>();
            ////this.photoCaptureRepositoryMock = new Mock<PhotoCaptureRepository>();
            ////this.shipTimeRepositoryMock = new Mock<ShipTimeRepository>();
            ////this.referenceDataRepositoryMock = new Mock<ReferenceDataRepository>();
            this.gangwayEventRepositoryMock = new Mock<GangwayEventRepository>();

            ////this.gangwayHistoryClient = new Mock<IGangwayHistoryClient>();
            ////this.personsClient = new Mock<IPersonsClient>();
            ////this.guestClient = new Mock<IGuestClient>();

            ////DIContainer.Instance.RegisterInstance<IGuestClient>(this.guestClient.Object);

            ////DIContainer.Instance.RegisterInstance<IPersonsClient>(this.personsClient.Object);

            ////DIContainer.Instance.RegisterInstance<IGangwayHistoryClient>(this.gangwayHistoryClient.Object);

            ////DIContainer.Instance.RegisterInstance<IRepository>(this.repository.Object);
            ////DIContainer.Instance.RegisterInstance<ReferenceDataRepository>(this.referenceDataRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<EmbarkationStatisticsRepository>(this.embarkationStatisticsRepositoryMock.Object);
            DIContainer.Instance.RegisterInstance<GangwayEventRepository>(this.gangwayEventRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<PhotoCaptureRepository>(this.photoCaptureRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<PersonServiceRepository>(this.personServiceRepositoryMock.Object);
            ////DIContainer.Instance.RegisterInstance<ShipTimeRepository>(this.shipTimeRepositoryMock.Object);
            ////this.service = new GangwayEventService();
            var gangwayHistoryData = new ListResult<GangwayHistory>();
            var gangwayHistory = new GangwayHistory { AlertCode = "1", AuthorizedAdultPersonId = "123", AuthorizedFirstName = "Demo", AuthorizedLastName = "demo", AuthorizedAdultPersonType = "1", ChargeId = "1", MachineName = "DC-Dev", PersonId = "123" };
            gangwayHistoryData.Items.Add(gangwayHistory);
            gangwayHistoryData.TotalResults = 1;

            this.gangwayEventRepositoryMock.Setup(a => a.RetrieveGangwayHistoryListAsync(It.IsNotNull<string>(), It.IsNotNull<string>(), 0, 0)).Returns(Task.FromResult(gangwayHistoryData));
            ////var gangwayHistoryData = @"{""ShipId"":""1"",""GangwayLocations"":[{""LocationId"":""1"",""LocationTypeId"":""1"",""Name"":""DK1""},""Voyages"":[{""VoyageId"":""8"",""ShipId"":""1"",""Number"":""SH201503200008"",""Name"":""8 Night Eastern"",""EmbarkDate"":""2015 - 03 - 20T00: 00:00"",""DebarkDate"":""2015 - 03 - 28T00: 00:00"",""EmbarkPortId"":""1"",""DebarkPortId"":""1"",""Nights"":8,""DestinationId"":""9"",""IsActive"":true,""MediaItemAddress"":""http://devweb03.decurtis.com/ImagingMediaService/MediaItems/2"",""Itineraries"":[{""VoyageItineraryId"":""29"",""Day"":2,""IsSeaDay"":true,""PortId"":"""",""ArrivalTime"":null,""DepartureTime"":null,""GangwayOpeningTime"":null,""GangwayClosingTime"":null}]}],""StateroomCategories"":[]}";
            ////this.gangwayHistoryClient.Setup(data => data.RetrieveGangwayHistoryListAsync(It.IsNotNull<string>(), It.IsAny<string>(), It.IsAny<string>(), null, null, 0, 0)).Returns(Task.FromResult(gangwayHistoryData));
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:59,代码来源:GangwayEventServiceTest.cs

示例6: SetUpData

        private void SetUpData()
        {
            Domain.Dependencies.Register();
            DataAccess.Dependencies.Register();

            Workstation ws = DIContainer.Instance.Resolve<Workstation>();

            ws.Port = new Port { PortId = "1" };
            ws.Ship = new Ship { ShipId = "1" };
            ws.GangwayLocation = new GangwayLocation { LocationId = "1" };
            ws.GangwayServiceBaseAddress = "http://Localhost/";
            ws.ConfigurationServiceBaseAddress = "http://Localhost/";
            ws.AuthenticationServiceBaseAddress = "http://Localhost/";
            ws.AuthorizationServiceBaseAddress = "http://Localhost/";
            ws.ConnectionMode = ConnectionMode.Online;
            var intCollection = new Collection<int>();
            intCollection.Add(0);
            var brand = new Brand { BrandId = "3", Name = "Carnival Breeze", MediaItemAddress = "http://172.26.248.122/ImagingMediaService/MediaItems/23" };
            brand.AssignPortIds(intCollection);
            ws.Brand = brand;

            this.personServiceRepositoryMock = new Mock<PersonServiceRepository>();
            this.referenceDataRepositoryMock = new Mock<ReferenceDataRepository>();
            DIContainer.Instance.RegisterInstance<ReferenceDataRepository>(this.referenceDataRepositoryMock.Object);
            DIContainer.Instance.RegisterInstance<PersonServiceRepository>(this.personServiceRepositoryMock.Object);

            this.personServiceRepositoryMock.Setup(data => data.RetrievePersonsBySearchText(It.IsNotNull<string>(), It.IsAny<string>(), It.IsAny<IList<PersonType>>(), It.IsAny<SearchType>(), null, null, 0, 0, null, null)).Returns(Task.FromResult(this.person));

            this.personTypes = new List<PersonType>();
            personTypes.Add(PersonType.Guest);

            var documentTypes = new DocumentTypeCollection();
            documentTypes.Add(new DocumentType { CountryId = "232", Code = "USA", DocumentTypeId = "1", Name = "Passport" });
            var referencedata = new ReferenceData();
            referencedata.AssignDocumentTypes(documentTypes);
            this.referenceDataRepositoryMock.Setup(data => data.RetrieveReferenceDataAsync()).Returns(Task.FromResult(referencedata));
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:37,代码来源:PersonPartyServiceTest.cs


注:本文中的Brand.AssignPortIds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。