/// <summary> /// Returns a value indicating whether the source element represented by the /// specified root ProtoElement can be added to this element. /// </summary> /// <param name="rootElement"> /// The root ProtoElement representing a source element. This can be null, /// in which case the ElementGroupPrototype does not contain an ProtoElements /// and the code should inspect the ElementGroupPrototype context information. /// </param> /// <param name="elementGroupPrototype">The ElementGroupPrototype that contains the root ProtoElement.</param> /// <returns>true if the source element represented by the ProtoElement can be added to this target element.</returns> protected override bool CanMerge(DslModeling::ProtoElementBase rootElement, DslModeling::ElementGroupPrototype elementGroupPrototype) { if (elementGroupPrototype == null) { throw new global::System.ArgumentNullException("elementGroupPrototype"); } if (rootElement != null) { DslModeling::DomainClassInfo rootElementDomainInfo = this.Partition.DomainDataDirectory.GetDomainClass(rootElement.DomainClassId); if (rootElementDomainInfo.IsDerivedFrom(global::BizTalkMessaging.Broker.DomainClassId)) { // Check that creating a link with this path doesn't cause multiplicity overflow: BizTalkMessagingModelHasBroker.Broker if (this.Broker != null) { return(false); } return(true); } if (rootElementDomainInfo.IsDerivedFrom(global::BizTalkMessaging.Application.DomainClassId)) { return(true); } } return(base.CanMerge(rootElement, elementGroupPrototype)); }
/// <summary> /// Returns a value indicating whether the source element represented by the /// specified root ProtoElement can be added to this element. /// </summary> /// <param name="rootElement"> /// The root ProtoElement representing a source element. This can be null, /// in which case the ElementGroupPrototype does not contain an ProtoElements /// and the code should inspect the ElementGroupPrototype context information. /// </param> /// <param name="elementGroupPrototype">The ElementGroupPrototype that contains the root ProtoElement.</param> /// <returns>true if the source element represented by the ProtoElement can be added to this target element.</returns> protected override bool CanMerge(DslModeling::ProtoElementBase rootElement, DslModeling::ElementGroupPrototype elementGroupPrototype) { if (elementGroupPrototype == null) { throw new global::System.ArgumentNullException("elementGroupPrototype"); } if (rootElement != null) { DslModeling::DomainClassInfo rootElementDomainInfo = this.Partition.DomainDataDirectory.GetDomainClass(rootElement.DomainClassId); if (rootElementDomainInfo.IsDerivedFrom(global::JA.Risk.Port.DomainClassId)) { return(true); } if (rootElementDomainInfo.IsDerivedFrom(global::JA.Risk.Asset.DomainClassId)) { return(true); } if (rootElementDomainInfo.IsDerivedFrom(global::JA.Risk.ThreatAgent.DomainClassId)) { return(true); } } return(base.CanMerge(rootElement, elementGroupPrototype)); }
/// <summary> /// Returns a value indicating whether the source element represented by the /// specified root ProtoElement can be added to this element. /// </summary> /// <param name="rootElement"> /// The root ProtoElement representing a source element. This can be null, /// in which case the ElementGroupPrototype does not contain an ProtoElements /// and the code should inspect the ElementGroupPrototype context information. /// </param> /// <param name="elementGroupPrototype">The ElementGroupPrototype that contains the root ProtoElement.</param> /// <returns>true if the source element represented by the ProtoElement can be added to this target element.</returns> protected override bool CanMerge(DslModeling::ProtoElementBase rootElement, DslModeling::ElementGroupPrototype elementGroupPrototype) { if (elementGroupPrototype == null) { throw new global::System.ArgumentNullException("elementGroupPrototype"); } if (rootElement != null) { DslModeling::DomainClassInfo rootElementDomainInfo = this.Partition.DomainDataDirectory.GetDomainClass(rootElement.DomainClassId); if (rootElementDomainInfo.IsDerivedFrom(global::Microsoft.EntityFrameworkCore.Modeling.EntityType.DomainClassId)) { return(true); } } return(base.CanMerge(rootElement, elementGroupPrototype)); }
/// <summary> /// Returns a value indicating whether the source element represented by the /// specified root ProtoElement can be added to this element. /// </summary> /// <param name="rootElement"> /// The root ProtoElement representing a source element. This can be null, /// in which case the ElementGroupPrototype does not contain an ProtoElements /// and the code should inspect the ElementGroupPrototype context information. /// </param> /// <param name="elementGroupPrototype">The ElementGroupPrototype that contains the root ProtoElement.</param> /// <returns>true if the source element represented by the ProtoElement can be added to this target element.</returns> protected override bool CanMerge(DslModeling::ProtoElementBase rootElement, DslModeling::ElementGroupPrototype elementGroupPrototype) { if (elementGroupPrototype == null) { throw new global::System.ArgumentNullException("elementGroupPrototype"); } if (rootElement != null) { DslModeling::DomainClassInfo rootElementDomainInfo = this.Partition.DomainDataDirectory.GetDomainClass(rootElement.DomainClassId); if (rootElementDomainInfo.IsDerivedFrom(global::ORMSolutions.ORMArchitect.ORMAbstraction.InformationTypeFormat.DomainClassId)) { return(true); } if (rootElementDomainInfo.IsDerivedFrom(global::ORMSolutions.ORMArchitect.ORMAbstraction.ConceptType.DomainClassId)) { return(true); } } return(base.CanMerge(rootElement, elementGroupPrototype)); }