Beispiel #1
0
        public static void Delete <T>(T obj) where T : SObject
        {
            var objectName = typeof(T).Name;

            Log.ForContext <SoqlApi>().Information("Deleting {$objectName} {$ID}", objectName, obj.Id);

            HttpManager httpManager = new HttpManager();

            httpManager.Del($"sobjects/{objectName}/{obj.Id}");
            UnitTestDataManager.RemoveId(obj.Id.ToString());
        }
Beispiel #2
0
        public static void Delete <T>(IEnumerable <T> objects) where T : SObject
        {
            var objectName  = typeof(T).Name;
            var httpManager = new HttpManager();
            var logger      = Log.ForContext <SoqlApi>();

            foreach (var obj in objects)
            {
                logger.Information("Deleting {$objectName} {$ID}", objectName, obj.Id);
                httpManager.Del($"sobjects/{objectName}/{obj.Id}");
                UnitTestDataManager.RemoveId(obj.Id.ToString());
            }
        }