Exemplo n.º 1
0
 public DrawingController(IDrawingService drawingService, ILabelService labelService, IRiggedFixtureService rFixtureService, IStructureService structureService, ITemplateService templateService, IViewService viewService)
 {
     _drawingService   = drawingService;
     _structureService = structureService;
     _templateService  = templateService;
     _authUtils        = new AuthUtils(drawingService, labelService, rFixtureService, structureService, viewService);
 }
Exemplo n.º 2
0
 public OnUsed(INWScript script,
               IDialogService dialog,
               IStructureService structure)
 {
     _          = script;
     _dialog    = dialog;
     _structure = structure;
 }
Exemplo n.º 3
0
 public OnOpened(INWScript script,
                 IStructureService structure,
                 ISerializationService serialization)
 {
     _              = script;
     _structure     = structure;
     _serialization = serialization;
 }
Exemplo n.º 4
0
 public BuildingExit(
     INWScript script,
     IDialogService dialog,
     IStructureService structure)
     : base(script, dialog)
 {
     _structure = structure;
 }
Exemplo n.º 5
0
 public AuthUtils(IDrawingService drawingService, ILabelService labelService, IRiggedFixtureService rFixtureService, IStructureService structureService, IViewService viewService)
 {
     _drawingService   = drawingService;
     _labelService     = labelService;
     _rFixtureService  = rFixtureService;
     _structureService = structureService;
     _viewService      = viewService;
 }
Exemplo n.º 6
0
 public OnModuleNWNXChat(
     IActivityLoggingService activityLogging,
     IChatCommandService chatCommand,
     IStructureService structure)
 {
     _activityLogging = activityLogging;
     _chatCommand     = chatCommand;
     _structure       = structure;
 }
Exemplo n.º 7
0
 public OnDisturbed(INWScript script,
                    IStructureService structure,
                    IColorTokenService color,
                    ISerializationService serialization)
 {
     _              = script;
     _structure     = structure;
     _color         = color;
     _serialization = serialization;
 }
Exemplo n.º 8
0
 public BuildToolMenu(
     INWScript script,
     IDialogService dialog,
     IStructureService structure,
     IColorTokenService color)
     : base(script, dialog)
 {
     _structure = structure;
     _color     = color;
 }
Exemplo n.º 9
0
 public StructureStorage(
     INWScript script,
     IDialogService dialog,
     IColorTokenService color,
     IStructureService structure)
     : base(script, dialog)
 {
     _color     = color;
     _structure = structure;
 }
Exemplo n.º 10
0
 public BuildingEntrance(
     INWScript script,
     IDialogService dialog,
     IStructureService structure,
     IPlayerService player)
     : base(script, dialog)
 {
     _structure = structure;
     _player    = player;
 }
Exemplo n.º 11
0
 public ViewBlueprints(
     INWScript script,
     IDialogService dialog,
     ICraftService craft,
     IStructureService structure)
     : base(script, dialog)
 {
     _craft     = craft;
     _structure = structure;
 }
Exemplo n.º 12
0
 public DrawingHub(IDrawingService drawingService, IFixtureService fixtureService, ILabelService labelService, IRiggedFixtureService rFixtureService, IStructureService structureService, IUserService userService, IViewService viewService)
 {
     _drawingService   = drawingService;
     _fixtureService   = fixtureService;
     _labelService     = labelService;
     _rFixtureService  = rFixtureService;
     _structureService = structureService;
     _userService      = userService;
     _viewService      = viewService;
     _authUtils        = new AuthUtils(drawingService, labelService, rFixtureService, structureService, viewService);
 }
Exemplo n.º 13
0
 public OnModuleUseFeat(
     INWScript script,
     IAbilityService ability,
     IStructureService structure,
     IPlayerService player)
 {
     _          = script;
     _ability   = ability;
     _structure = structure;
     _player    = player;
 }
Exemplo n.º 14
0
 public TerritoryFlag(
     INWScript script,
     IDialogService dialog,
     IStructureService structure,
     IColorTokenService color,
     IPlayerService player)
     : base(script, dialog)
 {
     _structure = structure;
     _color     = color;
     _player    = player;
 }
Exemplo n.º 15
0
 public OnModuleLoad(INWScript script,
                     INWNXChat nwnxChat,
                     INWNXEvents nwnxEvents,
                     IDeathService death,
                     IStructureService structure,
                     IObjectProcessingService objectProcessing,
                     IFarmingService farming)
 {
     _                 = script;
     _nwnxChat         = nwnxChat;
     _nwnxEvents       = nwnxEvents;
     _death            = death;
     _structure        = structure;
     _objectProcessing = objectProcessing;
     _farming          = farming;
 }
Exemplo n.º 16
0
        public void VerifyMemberOverloadUsesSubsetOfAllTypeVerifiers()
        {
            PropertyInfo propertyToVerify = typeof(string).GetProperty("Length");

            IMemberVerifier verifier1 = Substitute.For <IMemberVerifier>();

            verifier1.Aspects.Returns(new[] { MemberVerificationAspect.PropertyType });
            IMemberVerifier verifier2 = Substitute.For <IMemberVerifier>();

            verifier2.Aspects.Returns(new[] { MemberVerificationAspect.PropertyIsStatic });
            IStructureService service = Substitute.For <IStructureService>();

            service.VerifyMember(propertyToVerify, new[] { verifier1, verifier2 }, MemberVerificationAspect.PropertyType);

            service.Received().VerifyMember(propertyToVerify, new[] { verifier1 });
        }
Exemplo n.º 17
0
 public ConstructionSite(
     INWScript script,
     IDialogService dialog,
     IColorTokenService color,
     IStructureService structure,
     IAuthorizationService authorization,
     IItemService item,
     ISkillService skill)
     : base(script, dialog)
 {
     _color         = color;
     _structure     = structure;
     _authorization = authorization;
     _item          = item;
     _skill         = skill;
 }
Exemplo n.º 18
0
        public void VerifyTypeOverloadUsesSubsetOfAllTypeVerifiers()
        {
            Type typeToVerify = typeof(object);

            ITypeVerifier verifier1 = Substitute.For <ITypeVerifier>();

            verifier1.Aspects.Returns(new[] { TypeVerificationAspect.AccessLevel });
            ITypeVerifier verifier2 = Substitute.For <ITypeVerifier>();

            verifier2.Aspects.Returns(new[] { TypeVerificationAspect.IsSubclassOf });
            IStructureService service = Substitute.For <IStructureService>();

            service.VerifyType(typeToVerify, new[] { verifier1, verifier2 }, TypeVerificationAspect.AccessLevel);

            service.Received().VerifyType(typeToVerify, new[] { verifier1 });
        }
Exemplo n.º 19
0
        public void VisitCorrectlyTransformsParameterExpression()
        {
            IStructureService service = Substitute.For <IStructureService>();

            service.TranslateType(typeof(ClassA)).Returns(typeof(ClassB));
            TypeVisitor visitor = new TypeVisitor(service)
            {
                TypeVerifiers = new ITypeVerifier[0]
            };

            Expression input    = Expression.Parameter(typeof(ClassA));
            Expression expected = Expression.Parameter(typeof(ClassB));

            Expression actual = visitor.Visit(input);

            AssertAreEqualExpressions(expected, actual);
        }
Exemplo n.º 20
0
 public OnAttacked(INWScript script,
                   ISkillService skill,
                   IPerkService perk,
                   IRandomService random,
                   IStructureService structure,
                   IColorTokenService color,
                   IItemService item,
                   IDurabilityService durability,
                   IPlayerService player)
 {
     _           = script;
     _skill      = skill;
     _perk       = perk;
     _random     = random;
     _structure  = structure;
     _color      = color;
     _item       = item;
     _durability = durability;
     _player     = player;
 }
        // Only uses a subset of the verifiers (keeps order)
        public static void VerifyMember(this IStructureService service, MemberInfo original, IMemberVerifier[] verifiers, params MemberVerificationAspect[] aspects)
        {
            List <IMemberVerifier> verifierSubset = new List <IMemberVerifier>();

            foreach (var aspect in aspects)
            {
                IEnumerable <IMemberVerifier> verifiersWithAspect = verifiers.Where(v => v.Aspects.Contains(aspect));

                // Each verifier is only added once as dublicates could potentially hurt performance,
                // because verifiers use reflection (which is slow) when verifying
                foreach (var verifier in verifiersWithAspect)
                {
                    if (!verifierSubset.Contains(verifier))
                    {
                        verifierSubset.Add(verifier);
                    }
                }
            }

            service.VerifyMember(original, verifierSubset.ToArray());
        }
Exemplo n.º 22
0
 public StructureController(ILogger <StructureController> logger, IStructureService structureService)
 {
     _logger           = logger;
     _structureService = structureService;
 }
Exemplo n.º 23
0
 public StructureController(IStructureService structureService)
 {
     _structureService = structureService;
 }
Exemplo n.º 24
0
 public StructureTool(IStructureService structure,
                      IDialogService dialog)
 {
     _structure = structure;
     _dialog    = dialog;
 }
Exemplo n.º 25
0
 public ViewController(IDrawingService drawingService, ILabelService labelService, IRiggedFixtureService rFixtureService, IStructureService structureService, IViewService viewService)
 {
     _viewService = viewService;
     _authUtils   = new AuthUtils(drawingService, labelService, rFixtureService, structureService, viewService);
 }
Exemplo n.º 26
0
 public TypeVisitor(IStructureService structureService)
 {
     _structureService = structureService;
 }
Exemplo n.º 27
0
 public RiggedFixtureService(OpenLDContext context, IStructureService structureService, IMapper mapper)
 {
     _context          = context;
     _structureService = structureService;
     _mapper           = mapper;
 }
Exemplo n.º 28
0
 public StructureTest(IStructureService structureService)
 {
     _structureService = structureService;
 }