コード例 #1
0
 /// <summary>
 /// Creates proxy from tree collection
 /// </summary>
 /// <param name="collection">Tree collection</param>
 /// <returns>Proxy</returns>
 public static ITreeCollectionProxy CreateProxy(this ITreeCollection collection)
 {
     if (Factory == null)
     {
         return(null);
     }
     return(Factory.CreateProxy(collection, checkValue));
 }
コード例 #2
0
 /// <summary>
 /// Checks whether a collection of trees has a fiction
 /// </summary>
 /// <param name="collection">The collection</param>
 /// <returns>True if operation has fictoin</returns>
 public static bool HasFiction(this ITreeCollection collection)
 {
     ObjectFormulaTree[] trees = collection.Trees;
     foreach (ObjectFormulaTree tree in trees)
     {
         if (tree.HasFiction())
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #3
0
        ITreeCollectionProxy ITreeCollectionProxyFactory.CreateProxy(ITreeCollection collection, Action <object> checkValue)
        {
            this.collection = collection;
            this.checkValue = checkValue;
            List <ObjectFormulaTree> lt = new List <ObjectFormulaTree>();

            ObjectFormulaTree[] tt = collection.Trees;
            foreach (ObjectFormulaTree t in tt)
            {
                if (t.ReturnType.IsEmpty())
                {
                    continue;
                }
                lt.Add(t);
            }
            trees = lt.ToArray();
            CreateCode();
            return(Proxy);
        }
コード例 #4
0
 /// <summary>
 /// Create proxy add
 /// </summary>
 /// <param name="collection">Collection of trees</param>
 /// <param name="obj">The object</param>
 public static void CreateProxy(this ITreeCollection collection, object obj)
 {
     onCreateProxy(collection, obj);
 }