예제 #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();
    }
 }
예제 #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;
 }
예제 #3
0
 /// <summary/>
 public override void Evaluate(object source) {
    Result = BplProxy.Create(source).PropertyPath;
 }
예제 #4
0
파일: BplProxy.cs 프로젝트: borkaborka/gmit
 /// <summary>Creates a new <see cref="BplProxy"/> instance.</summary>
 public BplProxy() {
    IsEmpty = true;
    IsLoaded = false;
    PropertyPath = new BplPropertyPath();
 }
예제 #5
0
파일: BplProxy.cs 프로젝트: borkaborka/gmit
 /// <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;
 }