示例#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);
 }