/// <summary> /// Raises the <see cref="NodeConstructing"/> event. /// </summary> /// <param name="descriptor">The descriptor of the root object being constructed.</param> /// <returns><c>true</c> if the node should be constructed, <c>false</c> if it should be discarded.</returns> /// <remarks>This method is internal so it can be used by the <see cref="ModelConsistencyCheckVisitor"/>.</remarks> internal bool NotifyNodeConstructing(ObjectDescriptor descriptor) { var handler = NodeConstructing; if (handler != null) { var args = new NodeConstructingArgs(descriptor, null); handler(this, args); return(!args.Discard); } return(true); }
/// <summary> /// Raises the <see cref="NodeConstructing"/> event. /// </summary> /// <param name="containerDescriptor">The descriptor of the container of the member being constructed, or of the object itself it is a root object.</param> /// <param name="member">The member descriptor of the member being constructed.</param> /// <returns><c>true</c> if the node should be constructed, <c>false</c> if it should be discarded.</returns> /// <remarks>This method is internal so it can be used by the <see cref="ModelConsistencyCheckVisitor"/>.</remarks> internal bool NotifyNodeConstructing(ObjectDescriptor containerDescriptor, IMemberDescriptor member) { var handler = NodeConstructing; if (handler != null) { var args = new NodeConstructingArgs(containerDescriptor, (MemberDescriptorBase)member); handler(this, args); return(!args.Discard); } return(true); }
/// <summary> /// Raises the <see cref="NodeConstructing"/> event. /// </summary> /// <param name="containerDescriptor">The descriptor of the container of the member being constructed, or of the object itself it is a root object.</param> /// <param name="member">The member descriptor of the member being constructed.</param> /// <param name="shouldProcessReference">Indicates whether the reference that will be created in the node should be processed or not.</param> /// <returns><c>true</c> if the node should be constructed, <c>false</c> if it should be discarded.</returns> /// <remarks>This method is internal so it can be used by the <see cref="ModelConsistencyCheckVisitor"/>.</remarks> internal bool NotifyNodeConstructing(ObjectDescriptor containerDescriptor, IMemberDescriptor member, out bool shouldProcessReference) { var handler = NodeConstructing; if (handler != null) { var args = new NodeConstructingArgs(containerDescriptor, (MemberDescriptorBase)member); handler(this, args); shouldProcessReference = !args.Discard && args.ShouldProcessReference; return(!args.Discard); } shouldProcessReference = true; return(true); }
/// <summary> /// Raises the <see cref="NodeConstructing"/> event. /// </summary> /// <param name="containerDescriptor">The descriptor of the container of the member being constructed, or of the object itself it is a root object.</param> /// <param name="member">The member descriptor of the member being constructed.</param> /// <param name="shouldProcessReference">Indicates whether the reference that will be created in the node should be processed or not.</param> /// <returns><c>true</c> if the node should be constructed, <c>false</c> if it should be discarded.</returns> /// <remarks>This method is internal so it can be used by the <see cref="ModelConsistencyCheckVisitor"/>.</remarks> internal void NotifyNodeConstructing(ObjectDescriptor containerDescriptor, IMemberDescriptor member, out bool shouldProcessReference) { var handler = NodeConstructing; if (handler != null) { var args = new NodeConstructingArgs(containerDescriptor, (MemberDescriptorBase)member); handler(this, args); shouldProcessReference = args.ShouldProcessReference; } else { shouldProcessReference = true; } }
/// <summary> /// Raises the <see cref="NodeConstructing"/> event. /// </summary> /// <param name="descriptor">The descriptor of the root object being constructed.</param> /// <param name="shouldProcessReference">Indicates whether the reference that will be created in the node should be processed or not.</param> /// <returns><c>true</c> if the node should be constructed, <c>false</c> if it should be discarded.</returns> /// <remarks>This method is internal so it can be used by the <see cref="ModelConsistencyCheckVisitor"/>.</remarks> private void NotifyNodeConstructing(ObjectDescriptor descriptor, out bool shouldProcessReference) { var handler = NodeConstructing; if (handler != null) { var args = new NodeConstructingArgs(descriptor, null); handler(this, args); shouldProcessReference = args.ShouldProcessReference; } else { shouldProcessReference = true; } }
/// <summary> /// Raises the <see cref="NodeConstructing"/> event. /// </summary> /// <param name="containerDescriptor">The descriptor of the container of the member being constructed, or of the object itself it is a root object.</param> /// <param name="member">The member descriptor of the member being constructed.</param> /// <param name="shouldProcessReference">Indicates whether the reference that will be created in the node should be processed or not.</param> /// <returns><c>true</c> if the node should be constructed, <c>false</c> if it should be discarded.</returns> /// <remarks>This method is internal so it can be used by the <see cref="ModelConsistencyCheckVisitor"/>.</remarks> internal bool NotifyNodeConstructing(ObjectDescriptor containerDescriptor, IMemberDescriptor member, out bool shouldProcessReference) { var handler = NodeConstructing; if (handler != null) { var args = new NodeConstructingArgs(containerDescriptor, (MemberDescriptorBase)member); handler(this, args); shouldProcessReference = !args.Discard && args.ShouldProcessReference; return !args.Discard; } shouldProcessReference = true; return true; }
/// <summary> /// Raises the <see cref="NodeConstructing"/> event. /// </summary> /// <param name="descriptor">The descriptor of the root object being constructed.</param> /// <param name="shouldProcessReference">Indicates whether the reference that will be created in the node should be processed or not.</param> /// <returns><c>true</c> if the node should be constructed, <c>false</c> if it should be discarded.</returns> /// <remarks>This method is internal so it can be used by the <see cref="ModelConsistencyCheckVisitor"/>.</remarks> internal bool NotifyNodeConstructing(ObjectDescriptor descriptor, out bool shouldProcessReference) { var handler = NodeConstructing; if (handler != null) { var args = new NodeConstructingArgs(descriptor, null); handler(this, args); shouldProcessReference = !args.Discard && args.ShouldProcessReference; return !args.Discard; } shouldProcessReference = true; return true; }