Пример #1
0
 public DtsTask(SourceType sourceType, string sourceName, TargetType targetType, ITarget target)
 {
     SourceType = sourceType;
     SourceName = sourceName;
     TargetType = targetType;
     Target = target;
 }
Пример #2
0
 public bool HasVisited(ITarget target)
 {
     if (Visited != null && Visited.Contains(target))
         return true;
     else
         return false;
 }
        ///////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////BUILD FROM V2.1 SCHEMA                 //////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////////////

        #region Constructors and Destructors

        /// <summary>
        ///   Initializes a new instance of the <see cref="MetadataReportObjectCore" /> class.
        /// </summary>
        /// <param name="parent"> The parent. </param>
        /// <param name="report"> The dataStructureObject. </param>
        public MetadataReportObjectCore(IMetadataSet parent, ReportType report)
            : base(SdmxStructureType.GetFromEnum(SdmxStructureEnumType.MetadataReport), parent)
        {
            this._reportedAttributes = new List<IReportedAttributeObject>();
            this.id = report.id;
            if (report.Target != null)
            {
                this._target = new TargetObjectCore(this, report.Target);
            }

            if (report.AttributeSet != null)
            {
                if (ObjectUtil.ValidCollection(report.AttributeSet.ReportedAttribute))
                {
                    this._reportedAttributes.Clear();

                    foreach (ReportedAttributeType each in report.AttributeSet.ReportedAttribute)
                    {
                        this._reportedAttributes.Add(new ReportedAttributeObjectObjectCore(this, each));
                    }
                }
            }

            this.Validate();
        }
Пример #4
0
		/*----------------------------------------------------------------------------------------*/
		#region Disposal
		/// <summary>
		/// Releases all resources currently held by the object.
		/// </summary>
		/// <param name="disposing"><see langword="True"/> if managed objects should be disposed, otherwise <see langword="false"/>.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && !IsDisposed)
				Target = null;

			base.Dispose(disposing);
		}
Пример #5
0
 /// <summary>
 /// Gets the value to inject into the specified target.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="target">The target.</param>
 /// <returns>The value to inject into the specified target.</returns>
 public object GetValue(IContext context, ITarget target)
 {
     var parameter = context
         .Parameters.OfType<IConstructorArgument>()
         .SingleOrDefault(p => p.AppliesToTarget(context, target));
     return parameter != null ? parameter.GetValue(context, target) : target.ResolveWithin(context);
 }
Пример #6
0
 public void Initialize(IAttackableTarget sourceParam, ITarget targetParam, SpellData data) {
     source = sourceParam;
     target = targetParam;
     baseData = data;
     InitializeData(data);
     InitView();
 }
Пример #7
0
 public virtual void Initialize(BaseBattleData dataParam, bool isDefenderParam, ITarget parentParam) {
     data = dataParam;
     isDefender = isDefenderParam;
     parent = parentParam;
     InitializeData();
     BattleManager.RegisterTarget(parent);
 }
Пример #8
0
 public static IList<ITarget> CreateTree(ITarget target)
 {
     var final = new List<ITarget>();
     final.AddRange(BuildDependancyTree(target.DependsOn));
     final.Add(target);
     return final;
 }
        /// <summary>
        /// Gets the position of the specified <see cref="FuncConstructorArgument"/> relative to the
        /// other <see cref="FuncConstructorArgument"/> of the same type in the specified context.
        /// </summary>
        /// <param name="argument">The argument for which the position is calculated.</param>
        /// <param name="context">The context of the argument.</param>
        /// <param name="target">The target.</param>
        /// <returns>
        ///     -1 if the parameter does not exist in the context or if another constructor argument applies for the target.
        ///     Otherwise the position of the specified <see cref="FuncConstructorArgument"/> within the other <see cref="FuncConstructorArgument"/> 
        ///     of the same type contained in context.Parameters.
        /// </returns>
        public int GetPositionOfFuncConstructorArgument(FuncConstructorArgument argument, IContext context, ITarget target)
        {
            int currentPosition = 0;
            int position = -1;
            foreach (var constructorArgumentParameter in context.Parameters.OfType<IConstructorArgument>())
            {
                var funcArgumentParameter = constructorArgumentParameter as FuncConstructorArgument;
                if (funcArgumentParameter != null)
                {
                    if (ReferenceEquals(argument, funcArgumentParameter))
                    {
                        position = currentPosition;
                    }
                    else
                    {
                        if (funcArgumentParameter.ArgumentType == target.Type)
                        {
                            currentPosition++;
                        }
                    }
                }
                else
                {
                    if (constructorArgumentParameter.AppliesToTarget(context, target))
                    {
                        return -1;
                    }
                }
            }

            return position;
        }
Пример #10
0
 public void UnregisterTarget(ITarget target) {
     GetAppropriateListForTarget(target).Remove(target);
     if (attackers.Count == 0 && attackersSpawners.TrueForAll(spawner => spawner.IsSpawnEnded())) {
         StopRound();
         GameManager.NextRound();
     }
 }
Пример #11
0
        public void Intercept(IInvocation invocation)
        {
            Target = MockObjectFactory.CreateTarget();

            invocation.Proceed();

            PrintObjectTree(invocation);
        }
Пример #12
0
    // When the player has entered the action they are using this turn
    public void SubmitActionRound(IAction action, Player player, ITarget target)
    {
        if (action is Card) {
            CastCard(action as Card, player, target);
        }

        PromptNextPlayer();
    }
Пример #13
0
        /// <summary>
        /// Constructor</summary>
        /// <param name="target">The ITarget whose information will be displayed</param>
        /// <param name="protocol">The target's protocol</param>
        public TargetViewModel(ITarget target, IProtocol protocol)
        {
            Requires.NotNull(target, "target");
            Requires.NotNull(protocol, "protocol");

            Target = target;
            m_protocol = protocol;
        }
Пример #14
0
        /// <summary>
        /// Constructs the Debugger for the specified Target.
        /// </summary>
        /// <param name="target">The target to be debugged.</param>
        public Debugger(ITarget target)
        {
            if (target == null) throw new ArgumentNullException();

            Target = target;
            Breakpoints = new BreakpointManager(this);
            DebugInformation = new DebugInformation();
        }
Пример #15
0
        /// <summary>
        /// Gets the value to inject into the specified target.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="target">The target.</param>
        /// <returns>The value to inject into the specified target.</returns>
        public object GetValue(IContext context, ITarget target)
        {
            Ensure.ArgumentNotNull(context, "context");
            Ensure.ArgumentNotNull(target, "target");

            var parameter = context.Parameters.OfType<PropertyValue>().Where(p => p.Name == target.Name).SingleOrDefault();
            return parameter != null ? parameter.GetValue(context) : target.ResolveWithin(context);
        }
Пример #16
0
		private void PrepareBackgroundManager ()
		{
			BackgroundManager backgroundManager = BackgroundManager.GetInstance (this.Activity);
			backgroundManager.Attach (this.Activity.Window);
			mBackgroundTarget = new PicassoBackgroundManagerTarget (backgroundManager);
			mDefaultBackground = Resources.GetDrawable (Resource.Drawable.default_background);
			mMetrics = new DisplayMetrics ();
			this.Activity.WindowManager.DefaultDisplay.GetMetrics (mMetrics);
		}
Пример #17
0
 /// <summary>
 /// Plots a direct course to the target and notifies the ship of the outcome via the
 /// onCoursePlotSuccess/Failure events if set. The actual location is adjusted for the ship's
 /// position within the fleet's formation.
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="speed">The speed.</param>
 public override void PlotCourse(ITarget target, float speed) {
     base.PlotCourse(target, speed);
     if (CheckApproachTo(Destination)) {
         OnCoursePlotSuccess();
     }
     else {
         OnCoursePlotFailure();
     }
 }
Пример #18
0
		public ImageLoaderTask(IDownloadCache downloadCache, IMainThreadDispatcher mainThreadDispatcher, IMiniLogger miniLogger, TaskParameter parameters, nfloat imageScale, ITarget<UIImage, ImageLoaderTask> target, bool clearCacheOnOutOfMemory)
			: base(mainThreadDispatcher, miniLogger, parameters, true, clearCacheOnOutOfMemory)
		{
			if (target == null)
				throw new ArgumentNullException(nameof(target));
			
			_target = target;
			DownloadCache = downloadCache;
		}
Пример #19
0
		public TargetObjectBaseCore(ITarget builtFrom,
				IIdentifiableRetrievalManager retrievalManager) : base(builtFrom) {
			this.referenceValues = new List<IReferenceValueBase>();
			this.builtFrom = builtFrom;
			/* foreach */
			foreach (IReferenceValue referenceValue  in  builtFrom.ReferenceValues) {
				referenceValues.Add(new ReferenceValueObjectBaseCore(referenceValue, retrievalManager));
			}
		}
Пример #20
0
		/*----------------------------------------------------------------------------------------*/
		#region Constructors
		/// <summary>
		/// Creates a new Argument.
		/// </summary>
		/// <param name="target">The argument's injection point.</param>
		/// <param name="resolver">The argument's dependency marker.</param>
		/// <param name="optional">A value indicating whether the argument is optional.</param>
		public Argument(ITarget target, IResolver resolver, bool optional)
		{
			Ensure.ArgumentNotNull(target, "target");
			Ensure.ArgumentNotNull(resolver, "dependency");

			Target = target;
			Resolver = resolver;
			Optional = optional;
		}
Пример #21
0
		public SimpleProvider (ITarget[] targets) {
			this.targets = new Hashtable ();

			if (targets == null)
				return;

			foreach (ITarget t in targets)
				AddTarget (t);
		}
Пример #22
0
 protected void CastCard(Card card, Player origin, ITarget target)
 {
     card.CastOrigin = origin;
     card.CastTarget = target;
     CardStack.Push (card);
     if (target is Player) {
         AlertPlayerForResponse(target as Player, origin, card);
     }
 }
Пример #23
0
 public Policy(string id, 
     ITarget target, 
     ICombiningAlgorithm combiningAlgorithm, 
     IEnumerable<IRule> rules)
 {
     Id = id;
     Target = target;
     CombiningAlgorithm = combiningAlgorithm;
     Rules = rules;
 }
Пример #24
0
        public bool EditUserTarget(ITarget target)
        {
            var t = target as TcpIpTarget;
            if (t == null)
                throw new ArgumentException("Can only edit TCP/IP targets");

            bool? res = DialogUtils.ShowDialogWithViewModel<TcpIpTargetEditDialog>(new TcpIpTargetEditDialogViewModel(t));
            
            return res.HasValue && res.Value;
        }
Пример #25
0
 public IOutputWriter Create(TargetType targetType, BlockingCollection<Block> outputQueue, ITarget target)
 {
     switch (targetType)
     {
         case TargetType.Callback:
             return new CallbackWriter(outputQueue, target);
         default:
             throw new ArgumentOutOfRangeException("targetType");
     }
 }
        protected override bool Redirect(Damage damage, ITarget target)
        {
            if (target == _from)
              {
            _to.ReceiveDamage(damage);
            return true;
              }

              return false;
        }
Пример #27
0
        public Camera(int width, int height, ITarget target = null)
        {
            m_WorldPosition = new Rectangle(0, 0, width, height);

            if (target != null)
            {
                m_Target = target;
                FocusOnTarget();
            }
        }
Пример #28
0
        public MicroProfiler(string name = null, IStopwatch stopwatch = null, ITarget target = null, Settings settings = null)
        {
            Name = name;
            if (settings == null)
                settings = Config.DefaultSettings;

            _stopwatch = stopwatch ?? settings.StopwatchInstance ?? Activator.CreateInstance(settings.StopwatchType) as IStopwatch;
            _target = target ?? settings.TargetInstance ?? Activator.CreateInstance(settings.TargetType) as ITarget;

            Start();
        }
        /// <summary>
        /// Checkes whether a binding exists for a given target on the parent of the specified kernel.
        /// </summary>
        /// <param name="kernel">The kernel.</param>
        /// <param name="context">The context.</param>
        /// <param name="target">The target.</param>
        /// <returns>Whether a binding exists for the target in the given context.</returns>
        private bool BindingExistsOnParentKernel(IKernel kernel, IContext context, ITarget target)
        {
            var childKernel = kernel as IChildKernel;
            if (childKernel != null)
            {
                var parentKernel = childKernel.ParentResolutionRoot as IKernel;
                return parentKernel != null && this.BindingExists(parentKernel, context, target);
            }

            return false;
        }
Пример #30
0
        public bool RedirectDamage(Damage damage, ITarget target)
        {
            foreach (var redirection in _redirections.ToList())
            {
                if (redirection.RedirectDamage(damage, target))
                {
                    return true;
                }
            }

            return false;
        }
#pragma warning restore RECS0108 // Warns about static fields in generic types

        public PlatformImageLoaderTask(ITarget <PImage, TImageView> target, TaskParameter parameters, IImageService imageService) : base(ImageCache.Instance, target, parameters, imageService)
        {
        }
Пример #32
0
 public bool CanTarget(ITarget target)
 {
     return(_castRules.CanTarget(target));
 }
Пример #33
0
 /// <summary>
 /// Gets the value for the parameter within the specified context.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="target">The target.</param>
 /// <returns>The value for the parameter.</returns>
 public object GetValue(IContext context, ITarget target)
 {
     Ensure.ArgumentNotNull(context, "context");
     return(ValueCallback(context, target));
 }
Пример #34
0
 public bool IsGoodTarget(ITarget target, Player controller)
 {
     return(_castRules.IsGoodTarget(target, controller));
 }
 protected abstract void ExecuteClassSpecificAttack(ITarget target, int damage);
Пример #36
0
 public Twoway(ITarget target)
 {
     _Target = target;
 }
 public void Attack(ITarget target)
 {
     target.TakeAttack(this.AttackPoints);
 }
Пример #38
0
 internal override IQuestion <T> CreateQuestion <T>(ITarget target, IConverters <T> converters, CultureInfo culture)
 {
     return(Apply(Visibility.Of(target), converters, culture));
 }
Пример #39
0
 /// <summary>
 /// Implements <see cref="ITargetContainer.Register(ITarget, Type)"/> by wrapping around the child target container created by this context on construction.
 /// </summary>
 /// <param name="target">See <see cref="ITargetContainer.Register(ITarget, Type)"/> for more</param>
 /// <param name="serviceType">See <see cref="ITargetContainer.Register(ITarget, Type)"/> for more</param>
 void ITargetContainer.Register(ITarget target, Type serviceType)
 {
     DependencyTargetContainer.Register(target, serviceType);
 }
Пример #40
0
 public PlatformImageLoaderTask(ITarget <WriteableBitmap, TImageView> target, TaskParameter parameters, IImageService imageService, Configuration configuration, IMainThreadDispatcher mainThreadDispatcher)
     : base(ImageCache.Instance, configuration.DataResolverFactory ?? DataResolvers.DataResolverFactory.Instance, target, parameters, imageService, configuration, mainThreadDispatcher, false)
 {
 }
 public SequenceControl(ITarget itarget, int id, Take take)
 {
     target    = itarget;
     this.id   = id;
     this.take = take;
 }
Пример #42
0
 public void MoveTo(ITarget target)
 {
     layoutElement.ignoreLayout = true;
     targetPosition             = target.Position;
     isMoving = true;
 }
Пример #43
0
 /// <summary>
 /// Test equality against another ITarget</summary>
 /// <param name="other">The ITarget to compare against</param>
 /// <returns>True if both ITargets have the same Host and HardwareId, otherwise false</returns>
 public bool Equals(ITarget other)
 {
     return((Host == other.Host) && (HardwareId == other.HardwareId));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ContextPreservingResolutionRoot"/> class.
 /// </summary>
 /// <param name="context">The parent context.</param>
 /// <param name="target">The parent target.</param>
 public ContextPreservingResolutionRoot(IContext context, ITarget target)
 {
     this.DefineParentContext(context, target);
 }
 /// <summary>
 /// Creates a child.
 /// </summary>
 /// <param name="service">The service.</param>
 /// <param name="parentContext">The parent context.</param>
 /// <param name="target">The target.</param>
 /// <returns>The created child request.</returns>
 public IRequest CreateChild(Type service, IContext parentContext, ITarget target)
 {
     return(this.originalRequest.CreateChild(service, parentContext, target));
 }
Пример #46
0
        public void Build(ITarget target)
        {
            AddMembers(Target, typeof(ITarget), target, nameof(ITarget.Id), nameof(ITarget.GetTempDirectory));

            var modulesElement = new XElement("Modules");

            Target.Add(modulesElement);

            var    moduleService     = target.Services.GetService <IModuleService>();
            string runtimeModuleName = target.GetPlatformModuleName("coreclr");

            foreach (IModule module in moduleService.EnumerateModules())
            {
                var moduleElement = new XElement("Module");
                modulesElement.Add(moduleElement);
                AddModuleMembers(moduleElement, module, runtimeModuleName);
            }

            var threadsElement = new XElement("Threads");

            Target.Add(threadsElement);

            var threadService   = target.Services.GetService <IThreadService>();
            var registerIndexes = new int[] { threadService.InstructionPointerIndex, threadService.StackPointerIndex, threadService.FramePointerIndex };

            foreach (IThread thread in threadService.EnumerateThreads())
            {
                var threadElement = new XElement("Thread");
                threadsElement.Add(threadElement);
                AddMembers(threadElement, typeof(IThread), thread, nameof(IThread.ThreadIndex), nameof(IThread.GetThreadContext));

                var registersElement = new XElement("Registers");
                threadElement.Add(registersElement);
                foreach (int registerIndex in registerIndexes)
                {
                    var registerElement = new XElement("Register");
                    registersElement.Add(registerElement);

                    if (threadService.TryGetRegisterInfo(registerIndex, out RegisterInfo info))
                    {
                        AddMembers(registerElement, typeof(RegisterInfo), info, nameof(Object.ToString), nameof(Object.GetHashCode));
                    }
                    if (thread.TryGetRegisterValue(registerIndex, out ulong value))
                    {
                        registerElement.Add(new XElement("Value", $"0x{value:X16}"));
                    }
                }
            }

            var runtimesElement = new XElement("Runtimes");

            Target.Add(runtimesElement);

            var runtimeService = target.Services.GetService <IRuntimeService>();

            foreach (IRuntime runtime in runtimeService.EnumerateRuntimes())
            {
                var runtimeElement = new XElement("Runtime");
                runtimesElement.Add(runtimeElement);
                AddMembers(runtimeElement, typeof(IRuntime), runtime, nameof(IRuntime.GetDacFilePath), nameof(IRuntime.GetDbiFilePath));

                var runtimeModuleElement = new XElement("RuntimeModule");
                runtimeElement.Add(runtimeModuleElement);
                AddModuleMembers(runtimeModuleElement, runtime.RuntimeModule, symbolModuleName: null);
            }
        }
Пример #47
0
 public Transform getInitialTarget(ITarget itarget)
 {
     return((keys[0] as OrientationKey).GetTarget(itarget));
 }
Пример #48
0
        // draw gizmos
        public override void drawGizmos(ITarget itarget, float gizmo_size, bool inPlayMode, int frame, int frameRate)
        {
            if (!obj)
            {
                return;
            }

            // draw line to target
            bool isLineDrawn = false;

            if (!inPlayMode)
            {
                for (int i = 0; i < keys.Count; i++)
                {
                    OrientationKey key = keys[i] as OrientationKey;
                    if (key == null)
                    {
                        continue;
                    }

                    OrientationKey keyNext = i + 1 < keys.Count ? keys[i + 1] as OrientationKey : null;

                    Transform t = key.GetTarget(itarget);
                    if (t)
                    {
                        //draw target
                        Gizmos.color = new Color(245f / 255f, 107f / 255f, 30f / 255f, 1f);
                        Gizmos.DrawSphere(t.position, 0.2f * (AnimateTimeline.e_gizmoSize / 0.1f));

                        //draw line
                        if (!isLineDrawn)
                        {
                            if (key.frame > frame)
                            {
                                isLineDrawn = true;
                            }
                            if (frame >= key.frame && frame <= key.endFrame)
                            {
                                if (keyNext == null || t == keyNext.GetTarget(itarget))
                                {
                                    Gizmos.color = new Color(245f / 255f, 107f / 255f, 30f / 255f, 0.2f);
                                    Gizmos.DrawLine(obj.transform.position, t.position);
                                }
                                isLineDrawn = true;
                            }
                        }
                    }
                }
            }
            // draw arrow
            Gizmos.color = new Color(245f / 255f, 107f / 255f, 30f / 255f, 1f);
            Vector3 pos  = obj.transform.position;
            float   size = (1.2f * (gizmo_size / 0.1f));

            if (size < 0.1f)
            {
                size = 0.1f;
            }
            Vector3 direction       = obj.forward * size;
            float   arrowHeadAngle  = 20f;
            float   arrowHeadLength = 0.3f * size;

            Gizmos.DrawRay(pos, direction);

            Vector3 right = Quaternion.LookRotation(direction) * Quaternion.Euler(0, 180 + arrowHeadAngle, 0) * new Vector3(0, 0, 1);
            Vector3 left  = Quaternion.LookRotation(direction) * Quaternion.Euler(0, 180 - arrowHeadAngle, 0) * new Vector3(0, 0, 1);

            Gizmos.DrawRay(pos + direction, right * arrowHeadLength);
            Gizmos.DrawRay(pos + direction, left * arrowHeadLength);
        }
Пример #49
0
 public WrappedTarget(ITarget target)
 {
     _inner = target;
 }
Пример #50
0
 public GroupTargetCommand(IAttackGroup attackGroup, ITarget target)
 {
     this.attackGroup = attackGroup;
     this.target      = target;
 }
Пример #51
0
 /// <summary>
 /// Creates a new instance of <see cref="Element"/> with a culture
 /// </summary>
 /// <param name="target"></param>
 /// <param name="culture"></param>
 public Element(ITarget target, CultureInfo culture) : base(target, culture)
 {
 }
Пример #52
0
 public void Attack(ITarget target)
 {
 }
Пример #53
0
 /// <summary>
 /// Check if the HardPoint has a module installed that is currently targeting
 /// the provided target.
 /// </summary>
 public bool HasTarget(ITarget target)
 {
     return((module.targeter != null) ? module.targeter.HasTarget(target) : false);
 }
Пример #54
0
 public PlatformImageLoaderTask(ITarget <UIImage, TImageView> target, TaskParameter parameters, IImageService imageService, Configuration configuration, IMainThreadDispatcher mainThreadDispatcher)
     : base(ImageCache.Instance, configuration.DataResolverFactory ?? DataResolvers.DataResolverFactory.Instance, target, parameters, imageService, configuration, mainThreadDispatcher, true)
 {
     // do not remove! Kicks scale retrieval so it's available for all, without deadlocks due to accessing MainThread
     ScaleHelper.Init();
 }
Пример #55
0
 public ThirdPartyBillingSystem(ITarget employeeSource)
 {
     this.employeeSource = employeeSource;
 }
Пример #56
0
 public Client(ITarget target)
 {
     _target = target;
 }
Пример #57
0
 /// <summary>
 /// Checks the skill target for correctness.
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="skilled">The skill owner (caster).</param>
 /// <returns>
 ///   <c>true</c> if the target is correct; otherwise, <c>false</c>.
 /// </returns>
 public override bool VerifyTarget(ITarget target, ISkilled skilled)
 {
     return(target is AreaTarget);
 }
Пример #58
0
 /// <summary>
 /// Creates a new instance of <see cref="Element"/>
 /// </summary>
 /// <param name="target"></param>
 public Element(ITarget target) : this(target, CultureInfo.CurrentCulture)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ContextPreservingRequest"/> class.
 /// </summary>
 /// <param name="originalRequest">The original request.</param>
 /// <param name="parentContext">The parent context.</param>
 /// <param name="originalTarget">The original target.</param>
 public ContextPreservingRequest(IRequest originalRequest, IContext parentContext, ITarget originalTarget)
 {
     this.parentContext   = parentContext;
     this.originalRequest = originalRequest;
     this.originalTarget  = originalTarget;
 }
Пример #60
0
 protected override void ExecuteClassSpecificAttack(ITarget target, int damage)
 {
     Console.WriteLine(ATTACK_MESSAGE, this, target, damage);
 }