示例#1
0
 /// <summary>
 /// Resolves the field from string Name using library. Should only be involked after redundancy pruning.
 /// </summary>
 /// <param name="library"></param>
 public void ResolveField()
 {
     Target = ProtocolLibrary.GetField(Parent.Name, FieldID);
     if (Parent.Switch.Cases.Count > 0)
     {
         Target.RequiredInBackground = true;
     }
 }
示例#2
0
        public void GenerateTargets(Kernel kernel)
        {
            switch (kernel.Type)
            {
            case KernelType.Field:
                var field = ProtocolLibrary.GetField(((FieldKernel)kernel).Protocol,
                                                     ((FieldKernel)kernel).Field);
                field.StoreAsResult();
                Fields.Add(field);
                break;

            case KernelType.Filter:
                var k         = (FilterKernel)kernel;
                var protocols = ProtocolLibrary.GetProtocols(k.Filter.ProtocolTargets);
                protocols.ForEach(p => p.StoreAsRule());
                Protocols.UnionWith(protocols);

                var filters = ProtocolLibrary.GetFieldFilters(k.Filter.FilterTargets);
                filters.ForEach(ff => ff.StoreAsRule());
                Filters.UnionWith(filters);

                break;
            }
        }
示例#3
0
 public KernelReadRecord(FieldKernel kernel)
 {
     ID             = kernel.ID;
     IntResultIndex = ProtocolLibrary.GetField(kernel.Protocol, kernel.Field).ResultIndex;
 }