Exemple #1
0
 /// <summary>Creates a new <see cref="BplReferenceValue"/> instance.</summary>
 public BplReferenceValue(LogicalDirection direction, BplReferenceKind kind, string property, object reference) {
    Direction = direction;
    Kind = kind;
    Property = property;
    if (reference.IsA<BplObject>()) {
       Path = new BplPropertyPath(reference).ToString();
    }
 }
Exemple #2
0
 /// <summary>Parses a property path from a string representation.</summary>
 /// <param name="pathString">The string representation of the property path.</param>
 /// <returns>The property path object.</returns>
 public static BplPropertyPath Parse(string pathString) {
    var path = new List<object>();
    var parts = pathString.Split(@"\.");
    for (var i=0; i<parts.Length; i++) {
       var pair = parts[i].Extract(@"(\w+)(?:\[(\d+)\])?");
       path.Add(pair[0]);
       if (pair[1].NotEmpty()) path.Add(Int32.Parse(pair[1]));
    }
    var propertyPath = new BplPropertyPath();
    propertyPath._path = path.ToArray();
    return propertyPath;
 }
 /// <summary/>
 public override void Evaluate(object source) {
    Result = BplProxy.Create(source).PropertyPath;
 }
Exemple #4
0
 /// <summary>Creates a new <see cref="BplProxy"/> instance.</summary>
 public BplProxy() {
    IsEmpty = true;
    IsLoaded = false;
    PropertyPath = new BplPropertyPath();
 }
Exemple #5
0
 /// <summary/>
 protected override void Deserialize(SerializationInfo si, StreamingContext context) {
    base.Deserialize(si, context);
    IsEmpty = si.GetBoolean("IsEmpty");
    IsLoaded = si.GetBoolean("IsLoaded");
    Key = si.GetValue("Key", typeof(object));
    PropertyPath = si.GetValue("PropertyPath", typeof(BplPropertyPath)) as BplPropertyPath;
 }