Ejemplo n.º 1
0
 public static void RemoveDependency(IAdditionalContent content, int dependency)
 {
     if (!(content is AdditionalContent))
     {
         throw new Exception(string.Format("Content type {0} does not inherit from AdditionalContent base class.", content.GetType()));
     }
     string str = (content as AdditionalContent).mContentDependencies.Replace(dependency.ToString(), "").Replace(",,", ",");
     (content as AdditionalContent).mContentDependencies = str;
 }
Ejemplo n.º 2
0
 public static void AddDependency(IAdditionalContent content, int dependency)
 {
     if (!(content is AdditionalContent))
     {
         throw new Exception(string.Format("Content type {0} does not inherit from AdditionalContent base class.", content.GetType()));
     }
     string mContentDependencies = (content as AdditionalContent).mContentDependencies;
     if ((mContentDependencies == null) || (mContentDependencies.Length < 1))
     {
         mContentDependencies = dependency.ToString();
     }
     else
     {
         mContentDependencies = mContentDependencies + "," + dependency.ToString();
     }
     (content as AdditionalContent).mContentDependencies = mContentDependencies;
 }