예제 #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;
        }
예제 #2
0
 public AFElement(Connection Connection, string ID, string Name, string Description, string Path)
     : base(Connection, ID, Name, Description, Path)
 {
     Initialize();
 }
예제 #3
0
 private void CreateLoader(Connection Connection)
 {
     if (Connection is WebAPI.WebAPIConnection)
         {
             _ElementLoader = new WebAPI.AFElementLoader();
         }
 }
예제 #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);
 }
예제 #5
0
 public static AFElementTemplate CreateInstance(Connection Connection, string ID, string Name, string Description, string Path)
 {
     return new AFElementTemplate(Connection, ID, Name, Description, Path);
 }
예제 #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);
 }
예제 #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);
 }
예제 #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));
 }
예제 #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);
 }
예제 #10
0
 public static AFElementTemplate FindByPath(Connection Connection, string Path)
 {
     return _templateLoader.FindByPath(Connection, Path);
 }
예제 #11
0
 public static IEnumerable<AFAttributeTemplate> GetAttributeTemplates(Connection Connection, string ElementID)
 {
     return _templateLoader.GetAttributeTemplates(Connection, ElementID);
 }
예제 #12
0
 public static AFElementTemplate Find(Connection Connection, string ID)
 {
     return _templateLoader.Find(Connection, ID);
 }
예제 #13
0
 public static bool Delete(Connection Connection, string ID)
 {
     return _templateLoader.Delete(Connection, ID);
 }
예제 #14
0
 public static bool CreateElementTemplate(Connection Connection, string ParentID, AFElementTemplate Template)
 {
     return _templateLoader.CreateElementTemplate(Connection, ParentID, Template);
 }
예제 #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);
 }
예제 #16
0
 private AFUnit(Connection Connection, string ID, string Name, string Description, string Path)
     : base(Connection, ID, Name, Description, Path)
 {
     Initialize();
 }
예제 #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)
 {
 }
예제 #18
0
 private void CreateLoader(Connection Connection)
 {
     if (Connection is WebAPI.WebAPIConnection)
         {
             _EventFrameLoader = new WebAPI.AFEventFrameLoader();
         }
 }
예제 #19
0
 public AFAttribute(LazyPI.Common.Connection Connection, string ID, string Name, string Description, string Path) : base(Connection, ID, Name, Description, Path)
 {
     Initialize();
 }
예제 #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);
 }
예제 #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);
 }
예제 #22
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="Path"></param>
 /// <returns></returns>
 public static AFElement FindByPath(Connection Connection, string Path)
 {
     return _ElementLoader.FindByPath(Connection, Path);
 }
예제 #23
0
 private void CreateLoader(Connection Connection)
 {
     if (Connection is WebAPI.WebAPIConnection)
     {
         _AttrLoader = new WebAPI.AFAttributeLoader();
     }
 }
예제 #24
0
 public static AFElementTemplate CreateInstance(Connection Connection, BaseObject bObj)
 {
     return new AFElementTemplate(Connection, bObj.ID, bObj.Name, bObj.Description, bObj.Path);
 }