public IEnumerable <Localizable> Validate(
     IComponentContext <ApplicationSettings> context,
     IValidationContext validationContext,
     ApplicationSettings settings)
 {
     if (settings.ApplicationCommunicationPort == settings.ProxyCommunicationPort)
     {
         yield return(new Localizable(
                          "ValueEqual",
                          context.GetComponentName(entity => entity.ApplicationCommunicationPort),
                          context.GetComponentName(entity => entity.ProxyCommunicationPort)));
     }
 }
Beispiel #2
0
 public IEnumerable <Localizable> Validate(
     IComponentContext <BokehDoF> context,
     IValidationContext validationContext,
     BokehDoF bokehDoF)
 {
     if (bokehDoF.DepthMaximum <= bokehDoF.DepthMinimum)
     {
         yield return(new Localizable(
                          "ValueLessThan",
                          context.GetComponentName(entity => entity.DepthMaximum),
                          context.GetComponentName(entity => entity.DepthMinimum)));
     }
 }
Beispiel #3
0
        public IEnumerable <Localizable> Validate(
            IComponentContext <DepthBuffer> context,
            IValidationContext validationContext,
            DepthBuffer depthBuffer)
        {
            if (depthBuffer.LinearZFar <= depthBuffer.LinearZNear)
            {
                yield return(new Localizable(
                                 "ValueLessThan",
                                 context.GetComponentName(entity => entity.LinearZFar),
                                 context.GetComponentName(entity => entity.LinearZNear)));
            }

            if (depthBuffer.DepthMaximum <= depthBuffer.DepthMinimum)
            {
                yield return(new Localizable(
                                 "ValueLessThan",
                                 context.GetComponentName(entity => entity.DepthMaximum),
                                 context.GetComponentName(entity => entity.DepthMinimum)));
            }
        }