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


C# Features类代码示例

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


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

示例1: TargetPlayerGambitImpl

	public TargetPlayerGambitImpl (Features pmFeature, PlayerTypes pmType, PlayerAdjectives pmAdjective, Player pmGambitPlayer)
	{
		feature = pmFeature;
		type = pmType;
		adjective = pmAdjective;
		gambitPlayer = pmGambitPlayer;
	}
开发者ID:sakurazuka90,项目名称:DnD5BattleEngine,代码行数:7,代码来源:TargetPlayerGambitImpl.cs

示例2: SetDisallowed

			public static void SetDisallowed(Features feature, bool value)
			{
				if (value)
					m_DisallowedFeatures |= feature;
				else
					m_DisallowedFeatures &= ~feature;
			}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:7,代码来源:Assistants.cs

示例3: FiltersForFeature

        public static List<Field> FiltersForFeature(Features feature)
        {
            List<Field> fields = new List<Field>();

            switch (feature)
            {
                case Features.Jobs:
                    fields.Add(Field.Keyword);
                    fields.Add(Field.FieldOfStudy);
                    fields.Add(Field.CompanyName);
                    fields.Add(Field.JobTitle);
                    fields.Add(Field.Location);
                    fields.Add(Field.JobType);
                    //fields.Add(Field.Source);
                    break;
                case Features.Alumni:
                    fields.Add(Field.Keyword);
                    fields.Add(Field.FieldOfStudy);
                    fields.Add(Field.CompanyName);
                    //fields.Add(Field.Location);
                    break;
                case Features.Salary:
                    fields.Add(Field.FieldOfStudy);
                    //fields.Add(Field.Location);
                    break;
                case Features.Housing:
                    fields.Add(Field.Keyword);
                    fields.Add(Field.Location);
                    break;
            }

            return fields;
        }
开发者ID:cray1,项目名称:jobsalt,代码行数:33,代码来源:FilterUtility.cs

示例4: Handle

 public Features.ShowMailingLabel.ViewModel Handle(Features.ShowMailingLabel.ViewRequest request, Features.ShowMailingLabel.ViewModel result)
 {
     using (var session = OpenSession())
     {
         var customer = session.Load<Sales.Customer>(request.CustomerId);
         result.Name = customer.Name;
         return result;
     }
 }
开发者ID:kijanawoodard,项目名称:soa-etudes,代码行数:9,代码来源:RequestHandler.cs

示例5: Write

        public void Write(Features features, AbsoluteFilePath fulldgmlFileName)
        {
            var list = new List<FeatureInfo>(features.AllFeatures);
            foreach (FeatureInfo featureInfo in list.OrderBy(x => x.FeatureType))
            {
                this.HandleNode(featureInfo, string.Empty);
            }

            this.WriteDgml(fulldgmlFileName);
        }
开发者ID:ursenzler,项目名称:ninject.features,代码行数:10,代码来源:DgmlProcessor.cs

示例6: GenerateValue

        protected override int GenerateValue(TestCase tc, Features f)
        {
            var instructions = tc.TestMethod.Body.Instructions.Where(IsRelevant).ToList();
            var ilCount = instructions.Count;
            var sequencePoints = instructions.Select(i => i.SequencePoint).Where(sp => sp != null).ToList();
            var lineNumbers = new HashSet<int>(sequencePoints.Select(sp => sp.StartLine));
            var spCount = sequencePoints.Count;

            return spCount > 0 ? lineNumbers.Count : (int)(ilCount / IL_PER_LOC);
        }
开发者ID:provegard,项目名称:testness,代码行数:10,代码来源:StatementCount.cs

示例7: CreateClientService

        /// <summary>Creates a client service for the given features.</summary>
        private IClientService CreateClientService(Features? features = null)
        {
            var client = new MockClientService();
            if (features.HasValue)
            {
                client.SetFeatures(new[] { Utilities.GetEnumStringValue(features.Value) });
            }

            return client;
        }
开发者ID:jtattermusch,项目名称:google-api-dotnet-client,代码行数:11,代码来源:BaseClientServiceTest.cs

示例8: Property

 private Property(string city, string streetAddress, double rent, bool moveInReady, string state, double purchasePrice, DateTime aquisitionDate, Features features, byte[] imageData)
 {
     PropertyID = "Prop_" + NextID++;
     StreetAddress = new Address() { State = state, City = city, StreetAddress = streetAddress };
     PurchasePrice = purchasePrice;
     IsReadyToRent = moveInReady;
     PropertyFeatures = features;
     AquisitionDate = Convert.ToDateTime(aquisitionDate);
     Rent = rent;
     ImageData = imageData;
 }
开发者ID:phinixx14,项目名称:Property-Managment,代码行数:11,代码来源:Property.cs

示例9: Start

	void Start()
	{
		foreach (FeatureInfo feature in usedFeatures) 
		{
			if (feature.reference != null)
			{
				activeFeatures = activeFeatures | feature.type;
				feature.reference.OnStart();
			}
		}
	}
开发者ID:Gogeen,项目名称:GhostTrainAssets,代码行数:11,代码来源:RoadFeatureController.cs

示例10: GetFeaturesInView

 public System.Collections.Generic.IEnumerable<IFeature> GetFeaturesInView(BoundingBox box, double resolution)
 {
     var features = new Features();
     IRaster raster = null;
     var view = new Viewport { Resolution = resolution, Center = box.GetCentroid(), Width = (box.Width / resolution), Height = (box.Height / resolution) };
     if (TryGetMap(view, ref raster))
     {
         IFeature feature = features.New();
         feature.Geometry = raster;
         features.Add(feature);
     }
     return features;
 }
开发者ID:HackatonArGP,项目名称:Guardianes,代码行数:13,代码来源:ArcGISImageServiceProvider.cs

示例11: IsFeatureEnabled

        public static bool IsFeatureEnabled(User aUser, Features aFeature)
        {
            bool myIsEnabled = true;

            foreach (FeaturesEnabled myFeaturesEnabled in aUser.FeaturesEnableds) {
                if(myFeaturesEnabled.FeatureName.Equals(aFeature.ToString())) {
                    if(!myFeaturesEnabled.Enabled) {
                        myIsEnabled = false;
                        break;
                    }
                }
            }

            return myIsEnabled;
        }
开发者ID:henryksarat,项目名称:Have-A-Voice,代码行数:15,代码来源:FeatureHelper.cs

示例12: Create

        public static IRenderer Create(GraphicsDevice device, Features rendererFeatures)
        {
            switch (rendererFeatures)
            {
                case Features.MultiPass | Features.PreTransformed | Features.SingleChannelTexCoords :
                    return new MultipassSimpleEffectRenderer_SingleChannel(device);

                case Features.MultiPass | Features.PreTransformed | Features.SingleChannelTexCoords | Features.AlphaTest:
                    return new MultipassSimpleEffectRenderer_SingleChannel(device);

                case Features.MultiPass | Features.PreTransformed | Features.DualChannelTexCoords:
                    return new MultipassDualTextureEffectRenderer_DualChannel(device);

                default:
                    throw new NotSupportedException();
            }
        }
开发者ID:ananthonline,项目名称:graffiti,代码行数:17,代码来源:IRenderer.cs

示例13: DisableFeature

        public ActionResult DisableFeature(Features feature)
        {
            if (!IsLoggedIn()) {
                return RedirectToLogin();
            }

            try {
                theFeatureService.DisableFeature(GetUserInformatonModel().Details, feature);
                ForceUserInformationRefresh();
                TempData["Message"] += MessageHelper.SuccessMessage(FEATURE_UPDATED);
            } catch (Exception e) {
                LogError(e, ErrorKeys.ERROR_MESSAGE);
                TempData["Message"] += MessageHelper.ErrorMessage(ErrorKeys.ERROR_MESSAGE);
            }

            return RedirectToAction("Main", "University", new { universityId = UniversityHelper.GetMainUniversity(GetUserInformatonModel().Details).Id });
        }
开发者ID:henryksarat,项目名称:Have-A-Voice,代码行数:17,代码来源:ProfileController.cs

示例14: CreateCellTemplate

        private DataTemplate CreateCellTemplate(Features.Documents.ColumnDefinition columnDefinition)
        {
            var templateString = GetXamlForDataTemplate(columnDefinition);

            try
            {
                var template = XamlReader.Load(templateString) as DataTemplate;
                if (template == null)
                {
                    throw new InvalidOperationException("Xaml did not produce a DataTemplate");
                }
                template.LoadContent();
                return template;
            }
            catch (XamlParseException)
            {
                return null;
            }
        }
开发者ID:925coder,项目名称:ravendb,代码行数:19,代码来源:DataGridColumnGenerator.cs

示例15: SetProperty

 public void SetProperty(int rowNumber, int idVehicle, Features feature, int code, object value)
 {
     Vehicle vehicle;
     if (Vehicles.ContainsKey(idVehicle))
     {
         vehicle = Vehicles[idVehicle];
     }
     else
     {
         switch (feature)
         {
             case Features.Trains:
                 vehicle = new Train(idVehicle);
                 Vehicles.Add(idVehicle, vehicle);
                 break;
             default:
                 break;
         }
     }
     Vehicles[idVehicle].SetProperty(rowNumber, code, feature, value);
 }
开发者ID:killergege,项目名称:OpenTTDTool,代码行数:21,代码来源:VehicleManager.cs


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