Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:OpenXesNet.model.XLog"/> class.
 /// </summary>
 /// <param name="attributes">The attribute map used to store this log's attributes.</param>
 /// <param name="initialCapacity">Initial capacity. If not specified, a default
 /// value of 0 is used.</param>
 public XLog(IXAttributeMap attributes, int initialCapacity = 0) : base(initialCapacity)
 {
     this.attributes            = attributes;
     this.extensions            = new HashSet <XExtension>();
     this.classifiers           = new List <IXEventClassifier>();
     this.globalEventAttributes = new List <XAttribute>();
     this.globalTraceAttributes = new List <XAttribute>();
     this.cachedInfo            = null;
     this.cachedClassifier      = null;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new log info summary with a custom event classifier.
        /// </summary>
        /// <returns>The log info summary for this log.</returns>
        /// <param name="log">The event log to create an info summary for.</param>
        /// <param name="classifier">The event classifier to be used.</param>
        public static IXLogInfo CreateLogInfo(IXLog log, IXEventClassifier classifier)
        {
            IXLogInfo info = log.GetInfo(classifier);

            if (info == null)
            {
                info = XLogInfo.Create((XLog)log, classifier);

                log.SetInfo(classifier, info);
            }
            return(info);
        }
Ejemplo n.º 3
0
 public void SetInfo(IXEventClassifier classifier, IXLogInfo info)
 {
     this.cachedClassifier = classifier;
     this.cachedInfo       = info;
 }