Exemplo n.º 1
0
        public void NavigationPropertiesShouldHaveAssociatedTargetMultiplicity()
        {
            var semanticTree = ModelMaker.GetSemanticTree("People?$filter=MyDog/Color eq 'Magenta'", this.edmModel);

            semanticTree.Query.As <FilterQueryNode>().Expression.As <BinaryOperatorQueryNode>().Left.As
            <PropertyAccessQueryNode>().Source.As <SingletonNavigationNode>().TargetMultiplicity.Should().Be(EdmMultiplicity.ZeroOrOne);
        }
Exemplo n.º 2
0
 public MyModel GetModel(String modelName, ModelMaker modelMaker)
 {
     if (!modelDict.ContainsKey(modelName))
     {
         modelDict[modelName] = modelMaker();
     }
     return(modelDict[modelName]);
 }
Exemplo n.º 3
0
        public void ComplexTypesShouldBeCastable()
        {
            var semanticTree = ModelMaker.GetSemanticTree("People?$filter=MyDog/MyPeople/any(a: a/MyAddress/MvcApplication3.Address/City eq 'Renton')", this.edmModel);

            var cmpAddress = this.edmModel.FindType("MvcApplication3.Address");

            semanticTree.Query.As <FilterQueryNode>().Expression.As <AnyQueryNode>().Body.As <BinaryOperatorQueryNode>().
            Left.As <PropertyAccessQueryNode>().Source.As <CastNode>().TypeReference.Definition.Should().Be(cmpAddress);
        }
Exemplo n.º 4
0
        public void ComplexTypeShouldCreateCorrectSemanticNode()
        {
            var semanticTree = ModelMaker.GetSemanticTree("People?$filter=MyAddress/City eq 'Tacoma'", this.edmModel);

            var cmpAddress = this.edmModel.FindType("MvcApplication3.Address");

            semanticTree.Query.As <FilterQueryNode>().Expression.As <BinaryOperatorQueryNode>().
            Left.As <PropertyAccessQueryNode>().Source.As <PropertyAccessQueryNode>().TypeReference.Definition.Should().Be(cmpAddress);
        }
Exemplo n.º 5
0
        public void NavigationPropertiesShouldCreateCorrectSemanticNode()
        {
            var semanticTree = ModelMaker.GetSemanticTree("People?$filter=MyDog/Color eq 'Magenta'", this.edmModel);

            var cmpDog = this.edmModel.FindType("MvcApplication3.Dog");

            semanticTree.Query.As <FilterQueryNode>().Expression.As <BinaryOperatorQueryNode>().Left.As
            <PropertyAccessQueryNode>().Source.As <SingletonNavigationNode>().TypeReference.Definition.Should().Be(cmpDog);
        }
Exemplo n.º 6
0
        public void PrimitiveCollectionTypeShouldBeAllowedUnderComplexType()
        {
            var semanticTree = ModelMaker.GetSemanticTree("People?$filter=MyAddress/MyNeighbors/any(a: a eq 'Christy' )", this.edmModel);

            var cmp = this.edmModel.FindType("Edm.String");

            semanticTree.Query.As <FilterQueryNode>().Expression.As <AnyQueryNode>().Body.As <BinaryOperatorQueryNode>().
            Left.As <ParameterQueryNode>().TypeReference.Definition.Should().Be(cmp);
        }
Exemplo n.º 7
0
    void SpawnMountain(float width, float height, Vector3 pos)
    {
        GameObject mountain = new GameObject("Mountain");

        mountain.transform.position = pos;
        mountain.AddComponent <MeshFilter>().mesh       = ModelMaker.Pyramid(width, height);
        mountain.AddComponent <MeshRenderer>().material = Resources.Load("Cage") as Material;
        mountain.AddComponent <MeshCollider>();
        mountain.AddComponent <Rigidbody>().isKinematic = true;
        StartCoroutine(RaiseMountain(mountain.transform, height));
    }
Exemplo n.º 8
0
 public void WhenAnyIsLedBySingletonNavigationPropertyShouldFail()
 {
     try
     {
         ModelMaker.GetSemanticTree("People?$filter=MyDog/MyPeople/MyDog/MyPeople/any(a: a/MyDog/Color eq 'Simba' )", this.edmModel);
     }
     catch (ODataException)
     {
         return;
     }
     throw new ODataException();
 }
Exemplo n.º 9
0
 public BaseControlStation_TabControls(XNADrawPanel xnaDrawPanel)
 {
     #region "XNA+++"
     this.xnaDrawPanel = xnaDrawPanel;
     this.content      = xnaDrawPanel.content;
     #endregion
     //************MODEL MAKER**********
     #region "MODEL INIT"
     modelMaker_DroneModel = new ModelMaker(xnaDrawPanel.GraphicsDevice, content.Load <Model>("Model/DroneFull"));
     #endregion
     #region "IMAGE LIST INIT"
     IMAGELIST.Add(content.Load <Texture2D>("Image/GUI/1_HUD/AngleBar"));              //0
     IMAGELIST.Add(content.Load <Texture2D>("Image/GUI/1_HUD/Pointer"));               //1
     IMAGELIST.Add(content.Load <Texture2D>("Image/GUI/1_HUD/Back"));                  //2
     IMAGELIST.Add(content.Load <Texture2D>("Image/GUI/1_HUD/Bar_H"));                 //3
     IMAGELIST.Add(content.Load <Texture2D>("Image/GUI/1_HUD/Bar_V"));                 //4
     IMAGELIST.Add(content.Load <Texture2D>("Image/GUI/1_HUD/TestBlackSpace"));        //5
     IMAGELIST.Add(content.Load <Texture2D>("Image/GUI/1_HUD/Navigator"));             //6
     IMAGELIST.Add(content.Load <Texture2D>("Image/GUI/1_HUD/BackTextureNavigation")); //7
     IMAGELIST.Add(content.Load <Texture2D>("Image/GUI/1_HUD/Nut"));                   //8
     IMAGELIST.Add(content.Load <Texture2D>("Image/GUI/1_HUD/NavigatorPin"));          //9
     IMAGELIST.Add(content.Load <Texture2D>("Image/GUI/1_HUD/CheckUncheckList"));      //10
     #endregion
     #region "FONT INIT"
     CSM_Font = xnaDrawPanel.HaettenschweilerFont;
     #endregion
     #region "CAMERA INIT"
     cam1 = new ArcBallCamera(ArcBallCameraMode.Free); cam1.Target = Vector3.Zero; cam1.Distance = 50;
     cam2 = new ArcBallCamera(ArcBallCameraMode.Free); cam2.Target = Vector3.Zero; cam2.Distance = 50;
     cam3 = new ArcBallCamera(ArcBallCameraMode.Free); cam3.Target = Vector3.Zero; cam3.Distance = 50;
     cam4 = new ArcBallCamera(ArcBallCameraMode.Free); cam4.Target = Vector3.Zero; cam4.Distance = 50;
     #endregion
     #region "H_V BAR INIT"
     ThrottleBar = new HUD.H_V_Bar(xnaDrawPanel.GraphicsDevice, "Throttle", HUD.H_V_Bar.ScrollType.Vertical, HUD.H_V_Bar.PointerAlign.Left, HUD.H_V_Bar.PointerFlow.DownUp, (int)MinThrottle, IMAGELIST, CSM_Font);
     ElevatorBar = new HUD.H_V_Bar(xnaDrawPanel.GraphicsDevice, "Elevator", HUD.H_V_Bar.ScrollType.Vertical, HUD.H_V_Bar.PointerAlign.Right, HUD.H_V_Bar.PointerFlow.DownUp, (int)MinElevator, IMAGELIST, CSM_Font);
     RudderBar   = new HUD.H_V_Bar(xnaDrawPanel.GraphicsDevice, "Rudder", HUD.H_V_Bar.ScrollType.Horizontal, HUD.H_V_Bar.PointerAlign.Bottom, HUD.H_V_Bar.PointerFlow.LeftRight, (int)MinRudder, IMAGELIST, CSM_Font);
     AileronBar  = new HUD.H_V_Bar(xnaDrawPanel.GraphicsDevice, "Aileron", HUD.H_V_Bar.ScrollType.Horizontal, HUD.H_V_Bar.PointerAlign.Bottom, HUD.H_V_Bar.PointerFlow.LeftRight, (int)MinAileron, IMAGELIST, CSM_Font);
     #endregion
     #region "MJPEC DECODER"
     mJpegDecoder = new MjpegDecoder();
     #endregion
 }
Exemplo n.º 10
0
 public MyModel GetModel(String modelName, ModelMaker modelMaker)
 {
     if (!modelDict.ContainsKey(modelName))
     {
         modelDict[modelName] = modelMaker();
     }
     return modelDict[modelName];
 }
Exemplo n.º 11
0
 public SQLService2(string connectionString) : base(connectionString)
 {
     MyModelMaker = new ModelMaker();
 }
Exemplo n.º 12
0
 public SQLService2(IConfiguration configuration) : base(configuration)
 {
     MyModelMaker = new ModelMaker();
 }