本文整理汇总了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;
}
示例2: SetDisallowed
public static void SetDisallowed(Features feature, bool value)
{
if (value)
m_DisallowedFeatures |= feature;
else
m_DisallowedFeatures &= ~feature;
}
示例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;
}
示例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;
}
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例9: Start
void Start()
{
foreach (FeatureInfo feature in usedFeatures)
{
if (feature.reference != null)
{
activeFeatures = activeFeatures | feature.type;
feature.reference.OnStart();
}
}
}
示例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;
}
示例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;
}
示例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();
}
}
示例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 });
}
示例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;
}
}
示例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);
}