public void Remove(string opcName) { if (OpcKeypair.ContainsKey(opcName)) { OpcKeypair.Remove(opcName); Save(); } }
public string GetAssetByOpc(string opcName) { //if (OpcKeypair.ContainsKey(opcName)) //{ // return OpcKeypair[opcName]; //} //else //{ // return null; //} return(OpcKeypair.ContainsKey(opcName) ? OpcKeypair[opcName] : null); }
public string GetOpcByAsset(string assetId) { return(OpcKeypair.ContainsValue(assetId) ? OpcKeypair.First(o => o.Value.Equals(assetId)).Key : null); }