protected SPEventReceiverDefinition FindEventReceiverDefinition(SPEventReceiverDefinitionCollection receivers, EventReceiverDefinition definition)
        {
            var receiverName = definition.Name.ToUpper();

            return receivers.OfType<SPEventReceiverDefinition>()
                            .FirstOrDefault(r =>
                                !string.IsNullOrEmpty(r.Name) &&
                                r.Name.ToUpper() == receiverName);
        }
예제 #2
0
        protected SPEventReceiverDefinition FindEventReceiverDefinition(SPEventReceiverDefinitionCollection receivers, EventReceiverDefinition definition)
        {
            var receiverName = definition.Name.ToUpper();

            return(receivers.OfType <SPEventReceiverDefinition>()
                   .FirstOrDefault(r =>
                                   !string.IsNullOrEmpty(r.Name) &&
                                   r.Name.ToUpper() == receiverName));
        }
        public ArrayInstance ToArray()
        {
            var result = this.Engine.Array.Construct();

            foreach (var iCal in m_eventReceiverDefinitionCollection.OfType <SPEventReceiverDefinition>().Select(def => new SPEventReceiverDefinitionInstance(this.Engine.Object.InstancePrototype, def)))
            {
                ArrayInstance.Push(result, iCal);
            }

            return(result);
        }