// Construct a property as a copy of another. public Property(Property copy) { name = copy.name; type = copy.type; objectValue = copy.objectValue; nextSibling = null; firstChild = null; documentation = null; action = copy.action; properties = null; baseProperty = null; if (copy.firstChild != null) { firstChild = new Property(copy.firstChild); } if (copy.nextSibling != null) { nextSibling = new Property(copy.nextSibling); } if (copy.documentation != null) { documentation = new PropertyDocumentation(copy.documentation); } }
public async Task ValidateAsync(Property entity, PropertyAction action) { switch (action) { case PropertyAction.Create: await ValidateCreateAsync(entity); break; case PropertyAction.Update: break; case PropertyAction.Delete: break; case PropertyAction.Process: break; case PropertyAction.Activate: break; default: throw new NotImplementedException(); } }
protected void AddAction(PropertyAction action) { if (!actions.Contains(action)) { actions.Add(action); } }
public OnPropertyEvent(string propertyName, string ownerMemberId, PropertyAction action, object propertyData = null) { this.propertyName = propertyName; this.ownerMemberId = ownerMemberId; this.propertyData = propertyData; this.action = action; }
internal static void NetworkProperty(PropertyData propertyData, PropertyAction action) { var caller = new[] { (byte)Types.Property, (byte)action, (byte)Internals.Padding }; var buffer = GsSerializer.Object.GetBuffer(propertyData); GsSerializer.Object.SendObject(caller, buffer); }
public void ValidActionCanBeParsed(string input) { PropertyAction action = DocumentParser.PropertyAction.Parse(input); Assert.NotEqual(PropertyAction.Invalid, action); Assert.Equal(input, action == PropertyAction.Add ? "+=" : "="); }
protected void RemoveAction(PropertyAction action) { if (!actions.Contains(action)) { return; } actions.Remove(action); }
public PropertyElement(PropertyAction action, IEnumerable <string> nameParts, ValueElement valueElement, string conditionalExpression) : base(action.ToString(), conditionalExpression) { Action = action; NameParts = nameParts.ToArray(); ValueElement = valueElement; FullName = string.Join(' ', NameParts); }
private void InvokeOnProperty(PSObject value, bool raw, PropertyAction action) { DirectoryEntryPropertyDictionary entryProperties = GetProperties(raw); foreach (PSPropertyInfo psprop in value.Properties) { if (entryProperties.ContainsKey(psprop.Name)) { action(entryProperties[psprop.Name], psprop.Value); } } }
/// <summary> /// Settings the property action. /// </summary> /// <param name="type">The type.</param> /// <param name="func">The func.</param> protected static T2 SettingPropertyAction <T2>(T2 owner, PropertyAction func) where T2 : class, new() { if (owner == null) { owner = new T2(); } foreach (PropertyInfo propInfo in typeof(T2).GetProperties(BindingFlags.Public | BindingFlags.Instance)) { func(propInfo, owner); } return(owner); }
private static void Main(string[] args) { var configMap = new ExeConfigurationFileMap(); configMap.ExeConfigFilename = args[0]; var config = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None); PropertyIdentification.BAL.PropertyAction action = new PropertyAction(); var logger = new NLogger(); logger.WriteLog("Test", LogLevel.Info); action.ProcessStart(); Console.ReadLine(); }
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- // Construct a property with the given name and type. public Property(string name, PropertyType type = PropertyType.String) { this.name = name; this.type = type; this.objectValue = 0; this.nextSibling = null; this.firstChild = null; this.documentation = null; this.action = null; this.properties = null; this.baseProperty = null; // Add the property action. if (Resources.ExistsResource<PropertyAction>(name)) this.action = Resources.GetResource<PropertyAction>(name); }
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- // Construct a property with the given name and type. public Property(string name, PropertyType type = PropertyType.String) { this.name = name; this.type = type; this.objectValue = 0; this.nextSibling = null; this.firstChild = null; this.documentation = null; this.action = null; this.properties = null; this.baseProperty = null; // Add the property action. if (Resources.ExistsResource <PropertyAction>(name)) { this.action = Resources.GetResource <PropertyAction>(name); } }
/// <summary> /// [Constructor] Create property object using value and delegate. /// </summary> public UnitPropertyWrapper(T initialValue, PropertyAction <T> getAction, PropertyAction <T> setAction) { this.initialValue = initialValue; this.getAction = getAction ?? (x => x); this.setAction = setAction ?? (x => x); }
// Construct a property as a copy of another. public Property(Property copy) { name = copy.name; type = copy.type; objectValue = copy.objectValue; nextSibling = null; firstChild = null; documentation = null; action = copy.action; properties = null; baseProperty = null; if (copy.firstChild != null) firstChild = new Property(copy.firstChild); if (copy.nextSibling != null) nextSibling = new Property(copy.nextSibling); if (copy.documentation != null) documentation = new PropertyDocumentation(copy.documentation); }
// Set the property action to occur when this property is modified. public Property SetAction(PropertyAction action) { this.action = action; return this; }
// Construct a property as a copy of another. public Property(Property copy) { name = copy.name; type = copy.type; intValue = copy.intValue; floatValue = copy.floatValue; stringValue = copy.stringValue; next = null; firstChild = null; documentation = null; action = copy.action; properties = null; if (copy.firstChild != null) firstChild = new Property(copy.firstChild); if (copy.next != null) next = new Property(copy.next); if (copy.documentation != null) documentation = new PropertyDocumentation(copy.documentation); }
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- // Construct a property with the given name and type. public Property(string name, PropertyType type = PropertyType.String) { this.name = name; this.type = type; this.intValue = 0; this.floatValue = 0; this.stringValue = ""; this.next = null; this.firstChild = null; this.documentation = null; this.action = null; this.properties = null; if (Resources.ExistsResource<PropertyAction>(name)) this.action = Resources.GetResource<PropertyAction>(name); }
// Set the property action to occur when this property is modified. public Property SetAction(PropertyAction action) { this.action = action; return(this); }
protected void AddAction(PropertyAction action) { _actions.Add(action); }