private SSAS.TabularTranslationsAnnotation GetAnnotation(Microsoft.AnalysisServices.BackEnd.DataModelingSandbox sandbox)
 {
     SSAS.TabularTranslationsAnnotation annotation = new SSAS.TabularTranslationsAnnotation();
     if (sandbox.Database.Annotations.Contains(TRANSLATIONS_ANNOTATION))
     {
         string xml = TabularHelpers.GetAnnotationXml(sandbox.Database, TRANSLATIONS_ANNOTATION);
         System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(SSAS.TabularTranslationsAnnotation));
         annotation = (SSAS.TabularTranslationsAnnotation)serializer.Deserialize(new System.IO.StringReader(xml));
     }
     return(annotation);
 }
 public static SSAS.TabularDisplayFoldersAnnotation GetAnnotation(Microsoft.AnalysisServices.BackEnd.DataModelingSandbox sandbox)
 {
     SSAS.TabularDisplayFoldersAnnotation annotation = new SSAS.TabularDisplayFoldersAnnotation();
     if (sandbox.Database.Annotations.Contains(DISPLAY_FOLDER_ANNOTATION))
     {
         string xml = TabularHelpers.GetAnnotationXml(sandbox.Database, DISPLAY_FOLDER_ANNOTATION);
         System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(SSAS.TabularDisplayFoldersAnnotation));
         annotation = (SSAS.TabularDisplayFoldersAnnotation)serializer.Deserialize(new System.IO.StringReader(xml));
     }
     return(annotation);
 }
 public static SSAS.TabularActionsAnnotation GetAnnotation(Cube cube)
 {
     SSAS.TabularActionsAnnotation annotation = new SSAS.TabularActionsAnnotation();
     if (cube.Annotations.Contains(SSAS.TabularActionsEditorForm.ACTION_ANNOTATION))
     {
         string xml = TabularHelpers.GetAnnotationXml(cube, SSAS.TabularActionsEditorForm.ACTION_ANNOTATION);
         System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(SSAS.TabularActionsAnnotation));
         annotation = (SSAS.TabularActionsAnnotation)serializer.Deserialize(new System.IO.StringReader(xml));
     }
     return(annotation);
 }
Exemple #4
0
 private SSAS.TabularHideMemberIfAnnotation GetAnnotation(Microsoft.AnalysisServices.BackEnd.DataModelingSandbox sandbox)
 {
     if (sandbox.Database.Annotations.Contains(HIDEMEMBERIF_ANNOTATION))
     {
         string xml = TabularHelpers.GetAnnotationXml(sandbox.Database, HIDEMEMBERIF_ANNOTATION);
         System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(BIDSHelper.SSAS.TabularHideMemberIfAnnotation));
         return((SSAS.TabularHideMemberIfAnnotation)serializer.Deserialize(new System.IO.StringReader(xml)));
     }
     else
     {
         return(new SSAS.TabularHideMemberIfAnnotation());
     }
 }