/// <summary> /// 根据一组Operation Key的定义产生一组ServiceOperation类 /// </summary> /// <param name="invokeWhenPersist">是否是持久化时调用</param> /// <param name="opKeys"></param> /// <returns></returns> public WfServiceOperationDefinitionCollection GetOperations(bool invokeWhenPersist, params string[] opKeys) { WfServiceOperationDefinitionCollection result = new WfServiceOperationDefinitionCollection(); if (opKeys != null) { foreach (string opKey in opKeys) { if (opKey.IsNotEmpty()) { string key = opKey.Trim(); if (key.IsNotEmpty()) { WfServiceOperationDefinitionConfigurationElement opElement = this.Operations[key]; if (opElement != null) { if (opElement.InvokeWhenPersist == invokeWhenPersist) { result.Add(new WfServiceOperationDefinition(opElement)); } } } } } } return(result); }
/// <summary> /// 从配置信息项初始化 /// </summary> /// <param name="element"></param> public void FromConfigurationElement(WfServiceOperationDefinitionConfigurationElement element) { element.NullCheck("element"); this._AddressDef = new WfServiceAddressDefinition(element.AddressKey); this.OperationName = element.OperationName; this.Params = new WfServiceOperationParameterCollection(element.Parameters); this.RtnXmlStoreParamName = element.ReturnParamName; this.Timeout = element.Timeout; this.InvokeWhenPersist = element.InvokeWhenPersist; }
/// <summary> /// 从配置信息项初始化 /// </summary> /// <param name="element"></param> public WfServiceOperationDefinition(WfServiceOperationDefinitionConfigurationElement element) { this.FromConfigurationElement(element); }