Elastacloud.AzureManagement.Fluent.Types.CscfgFile.GetInstanceCountElementForRole C# (CSharp) Метод

GetInstanceCountElementForRole() приватный Метод

Gets the instance count for the role
private GetInstanceCountElementForRole ( string roleName ) : System.Xml.Linq.XElement
roleName string The name of the role
Результат System.Xml.Linq.XElement
        private XElement GetInstanceCountElementForRole(string roleName)
        {
            XElement role = OriginalVersion.Descendants(Namespaces.NsServiceManagement + "Role")
               .FirstOrDefault(a => (string)a.Attribute("name") == roleName);
            // updates the instance count number here
            return role.Elements(Namespaces.NsServiceManagement + "Instances")
                .FirstOrDefault();
        }