Here are the examples of the csharp api class Microsoft.AnalysisServices.AdomdClient.AdomdRestrictionCollection.Add(Microsoft.AnalysisServices.AdomdClient.AdomdRestriction) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
0
1. Example
Project: NBi
Source File: DataTypeDiscoveryFactoryProvider.cs
Source File: DataTypeDiscoveryFactoryProvider.cs
protected virtual string InquireFurtherAnalysisService(string connectionString) { try { var parsedMode = string.Empty; using (var conn = new AdomdConnection(connectionString)) { conn.Open(); var restrictions = new AdomdRestrictionCollection(); restrictions.Add(new AdomdRestriction("ObjectExpansion", "ReferenceOnly")); var ds = conn.GetSchemaDataSet("DISCOVER_XML_METADATA", restrictions); var xml = ds.Tables[0].Rows[0].ItemArray[0].ToString(); var doc = new XmlDocument(); doc.LoadXml(xml); parsedMode = ParseXmlaResponse(doc); } switch (parsedMode) { case "Default": return Olap; case "Multidimensional": return Olap; case "SharePoint": return Tabular; case "Tabular": return Tabular; } } catch (Exception ex) { Trace.WriteLineIf(NBiTraceSwitch.TraceWarning,"Can't detect server mode for SSAS, using Olap. Initial message:" + ex.Message); return Olap; } return Olap; }
0
2. Example
Project: NBi
Source File: StructureDiscoveryFactoryProvider.cs
Source File: StructureDiscoveryFactoryProvider.cs
protected virtual string InquireFurtherAnalysisService(string connectionString) { try { var parsedMode = string.Empty; using (var conn = new AdomdConnection(connectionString)) { conn.Open(); var restrictions = new AdomdRestrictionCollection(); restrictions.Add(new AdomdRestriction("ObjectExpansion", "ReferenceOnly")); var ds = conn.GetSchemaDataSet("DISCOVER_XML_METADATA", restrictions); var xml = ds.Tables[0].Rows[0].ItemArray[0].ToString(); var doc = new XmlDocument(); doc.LoadXml(xml); parsedMode = ParseXmlaResponse(doc); } switch (parsedMode) { case "Default": return Olap; case "Multidimensional": return Olap; case "SharePoint": return Tabular; case "Tabular": return Tabular; } } catch (Exception ex) { Trace.WriteLineIf(NBiTraceSwitch.TraceWarning,"Can't detect server mode for SSAS, using Olap. Initial message:" + ex.Message); return Olap; } return Olap; }