public IEnumerable<ResourceType> GetDerivedTypes(ResourceType resourceType)
		{
			TraceHelper.Current.MethodCall0("DataServiceMetadataProvider", "GetDerivedTypes");
			if (resourceType != null)
			{
				return resourceType.GetDerivedTypes();
			}
			else
			{
				return null;
			}
		}
Example #2
0
		private static void GetDescendants(ResourceType resourceType, HashSet<ResourceType> familyResources)
		{
			familyResources.Add(resourceType);
			foreach (ResourceType derivedType in resourceType.GetDerivedTypes())
			{
				Func<ResourceType, bool> func = null;
				HashSet<ResourceType> resourceTypes = familyResources;
				if (func == null)
				{
					func = (ResourceType item) => item.FullName == derivedType.FullName;
				}
				if (resourceTypes.Any<ResourceType>(func))
				{
					continue;
				}
				ResourceTypeExtensions.GetDescendants(derivedType, familyResources);
			}
		}
		public bool HasDerivedTypes(ResourceType resourceType)
		{
			TraceHelper.Current.MethodCall0("DataServiceMetadataProvider", "HasDerivedTypes");
			if (resourceType != null)
			{
				return resourceType.GetDerivedTypes().Count > 0;
			}
			else
			{
				return false;
			}
		}