Adxstudio.Xrm.Caching.ObjectCacheExtensions.GetContentValues(Microsoft.Xrm.Sdk.OrganizationResponse)

Here are the examples of the csharp api class Adxstudio.Xrm.Caching.ObjectCacheExtensions.GetContentValues(Microsoft.Xrm.Sdk.OrganizationResponse) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: xRM-Portals-Community-Edition
Source File: ObjectCacheExtensions.cs
private static IEnumerable<XElement> GetContentValues(object value, bool expanded)
		{
			if (!expanded || value == null) yield break;

			var response = value as OrganizationResponse;
			var entity = value as Entity;
			var entities = value as EntityCollection;

			if (response != null)
			{
				yield return new XElement("value", GetContentValues(response));
			}
			else if (entity != null)
			{
				yield return new XElement("value", GetContentValue(entity, new[] { entity }));
			}
			else if (entities != null)
			{
				yield return new XElement("value", GetContentValue(entities, new Entity[] { }));
			}
			else
			{
				yield return new XElement("value", value.ToString());
			}
		}