Beispiel #1
0
        public Rule(YR_RULE rule)
        {
            IntPtr ptr = rule.identifier;

            Identifier = Marshal.PtrToStringAnsi(ptr);
            Tags       = new List <string>();
            ObjRefHelper.ForEachStringInObjRef(rule.tags, Tags.Add);
            Metas    = ObjRefHelper.GetMetas(rule.metas).Select(ExtractMetaValue).ToDictionary();
            TimeCost = rule.time_cost;
        }
Beispiel #2
0
        public Rule(YR_RULE rule)
        {
            IntPtr ptr = rule.identifier;

            Identifier = Marshal.PtrToStringAnsi(ptr);

            Tags = new List <string>();

            ObjRefHelper.ForEachStringInObjRef(rule.tags, Tags.Add);
        }