Esempio n. 1
0
        internal AFAttribute(LazyPI.Common.Connection Connection, string WebID, string ID, string Name, string Description, string Path, string UnitsName, string ConfigString, string DataReferencePlugin, string AttrType, IEnumerable <string> Categories)
            : base(Connection, WebID, ID, Name, Description, Path)
        {
            Initialize();

            this.Categories   = Categories;
            this.ConfigString = ConfigString;
            Type = AttrType;
            DataReferencePlugIn = DataReferencePlugin;
            this.UnitsName      = UnitsName;
        }
Esempio n. 2
0
 public AFElement(Connection Connection, string ID, string Name, string Description, string Path)
     : base(Connection, ID, Name, Description, Path)
 {
     Initialize();
 }
Esempio n. 3
0
 private void CreateLoader(Connection Connection)
 {
     if (Connection is WebAPI.WebAPIConnection)
         {
             _ElementLoader = new WebAPI.AFElementLoader();
         }
 }
Esempio n. 4
0
 /// <summary>
 /// Find all of the child elements with a specific template.
 /// </summary>
 /// <param name="RootID">The parent or root for the search</param>
 /// <param name="TemplateName">Name of the template to be searched for.</param>
 /// <param name="MaxCount">Max number of elements that should be searched for.</param>
 /// <returns>A list of elements that have a specific template.</returns>
 public static IEnumerable<AFElement> FindByTemplate(Connection Connection, string RootID, string TemplateName, int MaxCount = 1000)
 {
     return _ElementLoader.GetElements(Connection, RootID, "*", "*", TemplateName, ElementType.Any, false, "Name", "Ascending", 0, MaxCount);
 }
Esempio n. 5
0
 public static AFElementTemplate CreateInstance(Connection Connection, string ID, string Name, string Description, string Path)
 {
     return new AFElementTemplate(Connection, ID, Name, Description, Path);
 }
Esempio n. 6
0
 /// <summary>
 /// Uses Path to find AFAttribute.
 /// </summary>
 /// <param name="Path">The full Path to the AFAttribute.</param>
 /// <returns></returns>
 public static AFAttribute FindByPath(Connection Connection, string Path)
 {
     return _AttrLoader.FindByPath(Connection, Path);
 }
Esempio n. 7
0
 /// <summary>
 /// Deletes attribute specified by ID.
 /// </summary>
 /// <param name="ID">The unique ID of the attribute to be deleted.</param>
 /// <returns></returns>
 public static bool Delete(Connection Connection, string ID)
 {
     return _AttrLoader.Delete(Connection, ID);
 }
Esempio n. 8
0
 /// <summary>
 /// Creates element using the partial Attribute provided.
 /// </summary>
 /// <param name="ElementID">The element that will hold the attribute.</param>
 /// <param name="Attr">The partial attribute holding information to create attribute.</param>
 /// <returns>Returns true if creation completes properly.</returns>
 /// <remarks>It is expected that the attribute will not have ID and Path</remarks>
 public static bool Create(LazyPI.Common.Connection Connection, string ElementID, AFAttribute Attr)
 {
     return(_AttrLoader.Create(Connection, ElementID, Attr));
 }
Esempio n. 9
0
 public AFUnit FindByPath(Connection Connection, string Path)
 {
     BaseObject baseObj = _UnitLoader.FindByPath(Connection, Path);
     return new AFUnit(Connection, baseObj.ID, baseObj.Name, baseObj.Description, baseObj.Path);
 }
Esempio n. 10
0
 public static AFElementTemplate FindByPath(Connection Connection, string Path)
 {
     return _templateLoader.FindByPath(Connection, Path);
 }
Esempio n. 11
0
 public static IEnumerable<AFAttributeTemplate> GetAttributeTemplates(Connection Connection, string ElementID)
 {
     return _templateLoader.GetAttributeTemplates(Connection, ElementID);
 }
Esempio n. 12
0
 public static AFElementTemplate Find(Connection Connection, string ID)
 {
     return _templateLoader.Find(Connection, ID);
 }
Esempio n. 13
0
 public static bool Delete(Connection Connection, string ID)
 {
     return _templateLoader.Delete(Connection, ID);
 }
Esempio n. 14
0
 public static bool CreateElementTemplate(Connection Connection, string ParentID, AFElementTemplate Template)
 {
     return _templateLoader.CreateElementTemplate(Connection, ParentID, Template);
 }
Esempio n. 15
0
 /// <summary>
 /// Removes specific element from AF Database
 /// </summary>
 /// <param name="ElementID">The ID of the element to be deleted</param>
 /// <returns></returns>
 public static bool Delete(Connection Connection, string ElementID)
 {
     return _ElementLoader.Delete(Connection, ElementID);
 }
Esempio n. 16
0
 private AFUnit(Connection Connection, string ID, string Name, string Description, string Path)
     : base(Connection, ID, Name, Description, Path)
 {
     Initialize();
 }
Esempio n. 17
0
 internal AFAttributeTemplate(LazyPI.Common.Connection Connection, string WebID, string ID, string Name, string Description, string Path)
     : base(Connection, WebID, ID, Name, Description, Path)
 {
 }
Esempio n. 18
0
 private void CreateLoader(Connection Connection)
 {
     if (Connection is WebAPI.WebAPIConnection)
         {
             _EventFrameLoader = new WebAPI.AFEventFrameLoader();
         }
 }
Esempio n. 19
0
 public AFAttribute(LazyPI.Common.Connection Connection, string ID, string Name, string Description, string Path) : base(Connection, ID, Name, Description, Path)
 {
     Initialize();
 }
Esempio n. 20
0
 /// <summary>
 /// Returns element requested
 /// </summary>
 /// <param name="ID"></param>
 /// <returns></returns>
 public static AFElement Find(Connection Connection, string ID)
 {
     return _ElementLoader.Find(Connection, ID);
 }
Esempio n. 21
0
 /// <summary>
 /// Finds attribute with the ID specified.
 /// </summary>
 /// <param name="ID">The unique ID of the attribute.</param>
 /// <returns>Returns a complete AFAttribute.</returns>
 public static AFAttribute Find(Connection Connection,string ID)
 {
     return _AttrLoader.Find(Connection, ID);
 }
Esempio n. 22
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="Path"></param>
 /// <returns></returns>
 public static AFElement FindByPath(Connection Connection, string Path)
 {
     return _ElementLoader.FindByPath(Connection, Path);
 }
Esempio n. 23
0
 private void CreateLoader(Connection Connection)
 {
     if (Connection is WebAPI.WebAPIConnection)
     {
         _AttrLoader = new WebAPI.AFAttributeLoader();
     }
 }
Esempio n. 24
0
 public static AFElementTemplate CreateInstance(Connection Connection, BaseObject bObj)
 {
     return new AFElementTemplate(Connection, bObj.ID, bObj.Name, bObj.Description, bObj.Path);
 }