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


C# ModelType类代码示例

本文整理汇总了C#中ModelType的典型用法代码示例。如果您正苦于以下问题:C# ModelType类的具体用法?C# ModelType怎么用?C# ModelType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: IModelo2D

 /// <summary>
 /// Initializes a new instance of the <see cref="IModelo2D"/> class.
 /// </summary>
 /// <param name="ModelType">Type of the model.</param>
 public IModelo2D(ModelType ModelType)
 {
     this.ModelType = ModelType;
     LayerDepth = 0;
     SourceRectangle = null;
     Rotation = 0;
 }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:11,代码来源:IModelo2D.cs

示例2: MyModel

 public MyModel(Project1Game game, VertexPositionColor[] shapeArray, String textureName)
 {
     this.vertices = Buffer.Vertex.New(game.GraphicsDevice, shapeArray);
     this.inputLayout = VertexInputLayout.New<VertexPositionColor>(0);
     vertexStride = Utilities.SizeOf<VertexPositionColor>();
     modelType = ModelType.Colored;
 }
开发者ID:KaiminHuang,项目名称:Graphics,代码行数:7,代码来源:MyModel.cs

示例3: GenConvertToModel

        public static void GenConvertToModel(StringBuilder builder, ModelType Model)
        {
            string ModelName = Model.Name.Value;

            builder.AppendLine(GeneratorUtil.TabString(1) + @"public static " + ModelName + " " + GetConvertName(Model.Name.Value) + "(DataRow row )");
            builder.AppendLine(GeneratorUtil.TabString(1) + "{");
            builder.AppendLine(GeneratorUtil.TabString(2)   + ModelName + " info = new " + ModelName + "();");
            foreach (FieldType field in Model.MyFields)
            {
                string systemType = field.SystemType.Value;
                string fieldName = field.Name.Value;
                string columnName = field.ColumnName.Value;

                builder.AppendLine(GeneratorUtil.TabString(2) + "if ( row[\"" + columnName + "\"] == DBNull.Value)");
                builder.AppendLine(GeneratorUtil.TabString(2) + "{");
                if (!field.NullAble.Value)
                {
                    builder.AppendLine(GeneratorUtil.TabString(3) + "info." + fieldName + " = default(" + systemType + ");");
                }
                builder.AppendLine(GeneratorUtil.TabString(2) + "}");
                builder.AppendLine(GeneratorUtil.TabString(2) + "else");
                builder.AppendLine(GeneratorUtil.TabString(2) + "{");
                builder.AppendLine(GeneratorUtil.TabString(3) + "info." + fieldName + " = (" + systemType + ")row[\"" + columnName + "\"];");
                builder.AppendLine(GeneratorUtil.TabString(2) + "}");
            }
            builder.AppendLine(GeneratorUtil.TabString(2) + "return info;");
            builder.AppendLine(GeneratorUtil.TabString(1) + "}");
        }
开发者ID:koksaver,项目名称:CodeHelper,代码行数:28,代码来源:SqlGenTableDAL.cs

示例4: HandRepresentation

    public HandRepresentation(int handID, Hand hand, Chirality chirality, ModelType modelType) {
      HandID = handID;
      this.MostRecentHand = hand;
      this.RepChirality = chirality;
      this.RepType = modelType;

    }
开发者ID:WilliamRADFunk,项目名称:vedic,代码行数:7,代码来源:HandRepresentation.cs

示例5: NewDbContextTemplateModel

        public NewDbContextTemplateModel(string dbContextName, ModelType modelType)
        {
            if (dbContextName == null)
            {
                throw new ArgumentNullException(nameof(dbContextName));
            }

            if (modelType == null)
            {
                throw new ArgumentNullException(nameof(modelType));
            }

            var modelNamespace = modelType.Namespace;

            ModelTypeName = modelType.Name;
            RequiredNamespaces = new HashSet<string>();

            var classNameModel = new ClassNameModel(dbContextName);

            DbContextTypeName = classNameModel.ClassName;
            DbContextNamespace = classNameModel.NamespaceName;

            if (!string.IsNullOrEmpty(modelNamespace) &&
                !string.Equals(modelNamespace, DbContextNamespace, StringComparison.Ordinal))
            {
                RequiredNamespaces.Add(modelNamespace);
            }
        }
开发者ID:leloulight,项目名称:Scaffolding,代码行数:28,代码来源:NewDbContextTemplateModel.cs

示例6: JsonInstance

 internal JsonInstance(ModelType type, string id)
 {
     this.Type = type;
     this.Id = id;
     this.instance = new ModelInstance(this);
     instanceProperties = new object[Type.Properties.Count];
 }
开发者ID:vc3,项目名称:ExoModel,代码行数:7,代码来源:JsonInstance.cs

示例7: IsASupportedModelType

 public static bool IsASupportedModelType(ModelType modelType)
 {
     switch(modelType)
     {
         case ModelType.Truss1D:
             return false;
         case ModelType.Beam1D:
             return true;
         case ModelType.Truss2D:
             return false;
         case ModelType.Frame2D:
             return true;
         case ModelType.Slab2D:
             return true;
         case ModelType.Membrane2D:
             return false;
         case ModelType.Truss3D:
             return false;
         case ModelType.Membrane3D:
             return false;
         case ModelType.MultiStorey2DSlab:
             return true;
         case ModelType.Full3D:
             return true;
         default:
             throw new NotImplementedException(string.Format(
                 System.Globalization.CultureInfo.InvariantCulture,
                 "Linear3DBeam.IsSupportedModelType(ModelType) has not been defined for a model type of {0}",
                 modelType));
     }
 }
开发者ID:iainsproat,项目名称:SharpFE,代码行数:31,代码来源:Linear3DBeam.cs

示例8: LoadData

        private async void LoadData(Uri location, ModelType modelType = ModelType.Line)
        {
            if (HttpClient != null)
            {
                _httpClient.BaseAddress = location;
                var response = await _httpClient.GetAsync(_httpClient.BaseAddress);
                response.EnsureSuccessStatusCode();
                var jsonResult = response.Content.ReadAsStringAsync().Result;

                var resultArray = JsonConvert.DeserializeObject(jsonResult);
                var result = resultArray as JArray;

                switch (modelType)
                {
                    case ModelType.Line:                        
                        foreach (JObject jsonObj in result)
                        {
                            Line line = JsonConvert.DeserializeObject<Line>(jsonObj.ToString());
                            Lines.Add(line);
                        }                        
                        break;

                    case ModelType.Stop:
                        foreach (var jsonObj in result)
                        {
                            var stop = JsonConvert.DeserializeObject<Stop>(jsonObj.ToString());
                            Stops.Add(stop);
                        }
                        break;

                    default:
                        break;
                }
            }
        }
开发者ID:lanedraex,项目名称:easybus-xamarin,代码行数:35,代码来源:EasyBus.cs

示例9: MakeHandRepresentation

        public override HandRepresentation MakeHandRepresentation(Leap.Hand hand, ModelType modelType)
        {
            HandRepresentation handRep = null;
              for (int i = 0; i < ModelPool.Count; i++) {
            IHandModel model = ModelPool[i];

            bool isCorrectHandedness;
            if(model.Handedness == Chirality.Either) {
              isCorrectHandedness = true;
            } else {
              Chirality handChirality = hand.IsRight ? Chirality.Right : Chirality.Left;
              isCorrectHandedness = model.Handedness == handChirality;
            }

            bool isCorrectModelType;
            isCorrectModelType = model.HandModelType == modelType;

            if(isCorrectHandedness && isCorrectModelType) {
              ModelPool.RemoveAt(i);
              handRep = new HandProxy(this, model, hand);
              break;
            }
              }
              return handRep;
        }
开发者ID:VRWizards,项目名称:VR-Project,代码行数:25,代码来源:HandPool.cs

示例10: MyModel

 public MyModel(LabGame game, VertexPositionColor[] shapeArray, String textureName, float collisionRadius)
 {
     this.vertices = Buffer.Vertex.New(game.GraphicsDevice, shapeArray);
     this.inputLayout = VertexInputLayout.New<VertexPositionColor>(0);
     vertexStride = Utilities.SizeOf<VertexPositionColor>();
     modelType = ModelType.Colored;
     this.collisionRadius = collisionRadius;
 }
开发者ID:georgecai904,项目名称:mazeball,代码行数:8,代码来源:MyModel.cs

示例11: ModelMethodParameter

 protected ModelMethodParameter(ModelMethod method, string name, Type parameterType, ModelType referenceType, bool isList)
 {
     this.Method = method;
     this.Name = name;
     this.ParameterType = parameterType;
     this.ReferenceType = referenceType;
     this.IsList = isList;
 }
开发者ID:vc3,项目名称:ExoModel,代码行数:8,代码来源:ModelMethodParameter.cs

示例12: SaveResearchInfo

 private void SaveResearchInfo(Guid researchID, 
     string researchName,
     ResearchType rType,
     ModelType mType,
     int realizationCount)
 {
     throw new NotImplementedException();
 }
开发者ID:aramazhari,项目名称:complexnetwork,代码行数:8,代码来源:SQLResultStorage.cs

示例13: DisplaySetServiceArgumentInfo

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="dsElementName"></param>
 /// <param name="dataType"></param>
 /// <param name="alias"></param>
 /// <param name="allowsNull"></param>
 public DisplaySetServiceArgumentInfo(string name, string dsElementName, ModelType dataType, string alias, bool allowsNull)
 {
     mName = name;
     mDSElementName = dsElementName;
     mDataType = dataType;
     mAlias = alias;
     mAllowsNull = allowsNull;
 }
开发者ID:sgon1853,项目名称:UPM_MDD_Thesis,代码行数:15,代码来源:DisplaySetServiceArgumentInfo.cs

示例14: HandProxy

 public HandProxy(HandPool parent, Hand hand, Chirality repChirality, ModelType repType) :
   base(hand.Id, hand, repChirality, repType)
 {
   this.parent = parent;
   this.RepChirality = repChirality;
   this.RepType = repType;
   this.MostRecentHand = hand;
 }
开发者ID:WilliamRADFunk,项目名称:vedic,代码行数:8,代码来源:HandProxy.cs

示例15: ModelInfo

        /// <summary>
        /// Constructor
        /// </summary>
        public ModelInfo(string projectId, string modelId, List<Guid> elementIds, ModelType modelType)
        {
            ProjectId = projectId;
            ModelId = modelId;
            ElementIds = elementIds;
            ModelType = modelType;

            _controller = DataController.Instance;
        }
开发者ID:corneliuspreidel,项目名称:TUM.CMS.VPLControl,代码行数:12,代码来源:ModelInfo.cs


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