Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Skyline.DataMiner.CommunityLibrary.Utility.Protocol

269 views26th February 2025protocol
2
Ryan Hepworth [DevOps Advocate]926 25th February 2025 0 Comments

Hi All

Does anyone know if this is an internal Skyline nuget package?

Skyline.DataMiner.CommunityLibrary.Utility.Protocol

Regards

Ryan

Michiel Oda [SLC] [DevOps Enabler] Answered question 26th February 2025

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
1
Michiel Oda [SLC] [DevOps Enabler]3.58K Posted 26th February 2025 4 Comments

Hi Ryan

Yes, the Skyline.DataMiner.CommunityLibrary.Utility.Protocol is an internal NuGet package. Depending on what you need from it, some parts (like the GetColumns) is already part of the Skyline.DataMiner.Core.DataMinerSystem.Protocol NuGet package (protocol.GetLocalElement().GetTable().GetColumns).

Michiel Oda [SLC] [DevOps Enabler] Posted new comment 6th March 2025
Ryan Hepworth [DevOps Advocate] commented 26th February 2025

Hi Michiel,

Thanks for that, I am wanting to use the ClearTables and GetColumnAsDictionary method.

Its a protocol from SkyLine that I am trying to slightly modify to test something out and in VS those are the only errors I am getting relating to that nuget package

Michiel Oda [SLC] [DevOps Enabler] commented 28th February 2025

Hi Ryan
That library isn't maintained anymore. I had a look and the ClearTables method is just doing a protocol.DeleteRows with the primaryKeys (via GetColumn). The GetColumnsAsDictionary is a regular GetColumns which is looped over and put in a dictionary. You could easily recreate these methods in your precompile QAction and remove the reference to UtilityLibrary (as that will be kept internal).

Ryan Hepworth [DevOps Advocate] commented 28th February 2025

Hi Michiel,

Ok thanks for this, when you say DeletRows, is that with an s or just protocol.DeleteRow?

Do you have these methods you could share?

Michiel Oda [SLC] [DevOps Enabler] commented 6th March 2025

Hi Ryan
I meant the protocol.DeleteRow. Instead of the 'raw' calls, I'll do you one better. Recently a new NuGet was made that contains some extension methods which are a clearer than the old NotifyProtocol calls.
You need to install the Skyline.DataMiner.Utils.Protocol.Extensions NuGet in your QAction. Then add the using 'using Skyline.DataMiner.Utils.Protocol.Extensions' at the top. Then in your code you can add these methods:

public static void ClearTable(SLProtocol protocol, int tablePid)
{
object[] keys = protocol.GetColumn(tablePid, 0);

protocol.DeleteRows(tablePid, keys);
}

public static IDictionary<string, object> GetColumnAsDictionary<T>(SLProtocol protocol, int tablePid, uint columnIdx)
where T : IConvertible
{
IDictionary<string, object> result = new Dictionary<string, object>();
object[] columns = protocol.GetColumns(tablePid, new uint[] { 0, columnIdx });
object[] keys = (object[])columns[0];
object[] values = (object[])columns[1];

for (int i = 0; i < keys.Length; i++)
{
result.Add(Convert.ToString(keys[i]), values[i].ChangeType<T>());
}

return result;
}

private static T ChangeType<T>(this object obj)
where T : IConvertible
{
if (obj == null)
{
return default(T);
}

var type = typeof(T);

if (type.IsEnum)
{
return (T)Enum.ToObject(type, obj.ChangeType<int>());
}

if (type != typeof(DateTime))
{
return (T)Convert.ChangeType(obj, type);
}

var oadate = Convert.ToDouble(obj);

if (oadate.CompareTo(-657435.0) >= 0 && oadate.CompareTo(2958465.99999999) <= 0)
{
object date = DateTime.FromOADate(oadate);

return (T)date;
}

throw new OverflowException($"{obj} is not a valid OA Date, supported range -657435.0 to 2958465.99999999");
}

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Alarm Dashboard PDF/CSV Export 1 Answer | 0 Votes
Is the Microsoft SharePoint Connector Still Usable 0 Answers | 0 Votes
Is the Microsoft SharePoint Connector Still Usable 0 Answers | 0 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (108) Correlation (68) Cube (150) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (139) driver (65) DVE (55) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (151) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) services (51) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin