Пример #1
0
        private void GetAllNodeTypeResourcesCompleted(object sender, GetAllNodeTypeResourcesCompletedEventArgs e)
        {
            List <INodeTypeProxy> nodeTypeProxies = new List <INodeTypeProxy>();

            foreach (SoapNodeType nodeType in e.Result.Values)
            {
                INodeTypeProxy nodeTypeProxy = new NodeTypeProxy(nodeType);

                nodeTypeProxies.Add(nodeTypeProxy);
            }

            ReturnedNodeTypesEventArgs eventArgs = new ReturnedNodeTypesEventArgs(nodeTypeProxies.ToArray());

            GetAllNodeTypesCompleted.Invoke(this, eventArgs);
        }
Пример #2
0
        private void OnGetAllSoapTypesAsyncCompleted(object sender, GetAllSoapTypesCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                List <INodeTypeProxy>         nodeTypeProxies         = new List <INodeTypeProxy>();
                List <IDescriptorTypeProxy>   descriptorTypeProxies   = new List <IDescriptorTypeProxy>();
                List <IRelationshipTypeProxy> relationshipTypeProxies = new List <IRelationshipTypeProxy>();
                List <IMetadataTypeProxy>     metadataTypeProxies     = new List <IMetadataTypeProxy>();

                foreach (SoapTypeElement soapElement in e.Result)
                {
                    if (soapElement is SoapNodeType)
                    {
                        INodeTypeProxy nodeTypeProxy = new NodeTypeProxy(soapElement as SoapNodeType);
                        nodeTypeProxies.Add(nodeTypeProxy);
                    }
                    else if (soapElement is SoapDescriptorType)
                    {
                        IDescriptorTypeProxy descriptorTypeProxy = new DescriptorTypeProxy(soapElement as SoapDescriptorType);
                        descriptorTypeProxies.Add(descriptorTypeProxy);
                    }
                    else if (soapElement is SoapRelationshipType)
                    {
                        IRelationshipTypeProxy relationshipTypeProxy = new RelationshipTypeProxy(soapElement as SoapRelationshipType);
                        relationshipTypeProxies.Add(relationshipTypeProxy);
                    }
                    else if (soapElement is SoapMetadataType)
                    {
                        IMetadataTypeProxy metadataTypeProxy = new MetadataTypeProxy(soapElement as SoapMetadataType);
                        metadataTypeProxies.Add(metadataTypeProxy);
                    }
                }

                if (GetAllSoapTypesCompleted != null)
                {
                    ReturnedTypesEventArgs eventArgs = new ReturnedTypesEventArgs();
                    eventArgs.NodeTypes         = nodeTypeProxies.ToArray();
                    eventArgs.DescriptorTypes   = descriptorTypeProxies.ToArray();
                    eventArgs.RelationshipTypes = relationshipTypeProxies.ToArray();
                    eventArgs.MetadataTypes     = metadataTypeProxies.ToArray();

                    GetAllSoapTypesCompleted.Invoke(this, eventArgs);
                }
            }
        }
Пример #3
0
        private void OnGetAllSoapTypesAsyncCompleted(object sender, GetAllSoapTypesCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                List<INodeTypeProxy> nodeTypeProxies = new List<INodeTypeProxy>();
                List<IDescriptorTypeProxy> descriptorTypeProxies = new List<IDescriptorTypeProxy>();
                List<IRelationshipTypeProxy> relationshipTypeProxies = new List<IRelationshipTypeProxy>();
                List<IMetadataTypeProxy> metadataTypeProxies = new List<IMetadataTypeProxy>();

                foreach (SoapTypeElement soapElement in e.Result)
                {
                    if (soapElement is SoapNodeType)
                    {
                        INodeTypeProxy nodeTypeProxy = new NodeTypeProxy(soapElement as SoapNodeType);
                        nodeTypeProxies.Add(nodeTypeProxy);
                    }
                    else if (soapElement is SoapDescriptorType)
                    {
                        IDescriptorTypeProxy descriptorTypeProxy = new DescriptorTypeProxy(soapElement as SoapDescriptorType);
                        descriptorTypeProxies.Add(descriptorTypeProxy);
                    }
                    else if (soapElement is SoapRelationshipType)
                    {
                        IRelationshipTypeProxy relationshipTypeProxy = new RelationshipTypeProxy(soapElement as SoapRelationshipType);
                        relationshipTypeProxies.Add(relationshipTypeProxy);
                    }
                    else if (soapElement is SoapMetadataType)
                    {
                        IMetadataTypeProxy metadataTypeProxy = new MetadataTypeProxy(soapElement as SoapMetadataType);
                        metadataTypeProxies.Add(metadataTypeProxy);
                    }
                }

                if (GetAllSoapTypesCompleted != null)
                {
                    ReturnedTypesEventArgs eventArgs = new ReturnedTypesEventArgs();
                    eventArgs.NodeTypes = nodeTypeProxies.ToArray();
                    eventArgs.DescriptorTypes = descriptorTypeProxies.ToArray();
                    eventArgs.RelationshipTypes = relationshipTypeProxies.ToArray();
                    eventArgs.MetadataTypes = metadataTypeProxies.ToArray();

                    GetAllSoapTypesCompleted.Invoke(this, eventArgs);
                }
            }
        }
Пример #4
0
        private void GetAllNodeTypeResourcesCompleted(object sender, GetAllNodeTypeResourcesCompletedEventArgs e)
        {
            List<INodeTypeProxy> nodeTypeProxies = new List<INodeTypeProxy>();

            foreach (SoapNodeType nodeType in e.Result.Values)
            {
                INodeTypeProxy nodeTypeProxy = new NodeTypeProxy(nodeType);

                nodeTypeProxies.Add(nodeTypeProxy);
            }

            ReturnedNodeTypesEventArgs eventArgs = new ReturnedNodeTypesEventArgs(nodeTypeProxies.ToArray());

            GetAllNodeTypesCompleted.Invoke(this, eventArgs);
        }