From 84f1db79b677414e439c673a56b279c12c5668fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 01:17:11 +0000 Subject: [PATCH] deploy: bb23b505abfc25a67b98db9af133243981d3521f --- 404.html | 4 ++-- __docusaurus/debug.html | 4 ++-- __docusaurus/debug/config.html | 4 ++-- __docusaurus/debug/content.html | 4 ++-- __docusaurus/debug/globalData.html | 4 ++-- __docusaurus/debug/metadata.html | 4 ++-- __docusaurus/debug/registry.html | 4 ++-- __docusaurus/debug/routes.html | 4 ++-- assets/js/{1f958b60.d2fb1f1c.js => 1f958b60.889be298.js} | 2 +- assets/js/{246f2c6f.6e41c7fd.js => 246f2c6f.aef5e074.js} | 2 +- assets/js/{418073dd.6582d765.js => 418073dd.acbe7b3f.js} | 2 +- assets/js/{8cbb5538.d02c2c0b.js => 8cbb5538.b302ad8e.js} | 2 +- assets/js/runtime~main.77bc56a1.js | 1 + assets/js/runtime~main.c022846d.js | 1 - generic/ring_buffer.html | 6 +++--- generic/specialized/ordered_dictionary.html | 6 +++--- index.html | 6 +++--- 17 files changed, 30 insertions(+), 30 deletions(-) rename assets/js/{1f958b60.d2fb1f1c.js => 1f958b60.889be298.js} (98%) rename assets/js/{246f2c6f.6e41c7fd.js => 246f2c6f.aef5e074.js} (93%) rename assets/js/{418073dd.6582d765.js => 418073dd.acbe7b3f.js} (98%) rename assets/js/{8cbb5538.d02c2c0b.js => 8cbb5538.b302ad8e.js} (98%) create mode 100644 assets/js/runtime~main.77bc56a1.js delete mode 100644 assets/js/runtime~main.c022846d.js diff --git a/404.html b/404.html index 7b90bd2..f223d98 100644 --- a/404.html +++ b/404.html @@ -4,13 +4,13 @@ Page Not Found | Extended.Collections - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/__docusaurus/debug.html b/__docusaurus/debug.html index cec4bb7..d74b56a 100644 --- a/__docusaurus/debug.html +++ b/__docusaurus/debug.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Site config

- + \ No newline at end of file diff --git a/__docusaurus/debug/config.html b/__docusaurus/debug/config.html index 2f8eb74..b8a6071 100644 --- a/__docusaurus/debug/config.html +++ b/__docusaurus/debug/config.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Site config

- + \ No newline at end of file diff --git a/__docusaurus/debug/content.html b/__docusaurus/debug/content.html index 8306629..3f2d4ea 100644 --- a/__docusaurus/debug/content.html +++ b/__docusaurus/debug/content.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Plugin content

docusaurus-plugin-content-docs

default
- + \ No newline at end of file diff --git a/__docusaurus/debug/globalData.html b/__docusaurus/debug/globalData.html index 9114daa..fb39ece 100644 --- a/__docusaurus/debug/globalData.html +++ b/__docusaurus/debug/globalData.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Global data

- + \ No newline at end of file diff --git a/__docusaurus/debug/metadata.html b/__docusaurus/debug/metadata.html index 5a280cf..9324acc 100644 --- a/__docusaurus/debug/metadata.html +++ b/__docusaurus/debug/metadata.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Site Metadata

Docusaurus Version: 2.4.1
Site Version: 0.0.0

Plugins and themes

  • 2.4.1
    docusaurus-plugin-debug
    Type: package
  • 2.4.1
    docusaurus-theme-classic
    Type: package
  • 2.4.1
    docusaurus-plugin-sitemap
    Type: package
  • 2.4.1
    docusaurus-plugin-content-docs
    Type: package
- + \ No newline at end of file diff --git a/__docusaurus/debug/registry.html b/__docusaurus/debug/registry.html index ce96b39..a69aa6e 100644 --- a/__docusaurus/debug/registry.html +++ b/__docusaurus/debug/registry.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Registry

  • Aliased Path: @theme/DocItem
    Resolved Path: 9714
  • Aliased Path: /home/runner/work/Extended.Collections/Extended.Collections/docusaurus/.docusaurus/docusaurus-plugin-debug/default/plugin-route-context-module-100.json
    Resolved Path: 3984
  • Aliased Path: @theme/DocPage
    Resolved Path: 1551
  • Aliased Path: @site/../documentation/generic/specialized/ordered_dictionary.md
    Resolved Path: 1245
  • Aliased Path: @theme/DebugConfig
    Resolved Path: 6074
  • Aliased Path: ~debug/default/docusaurus-debug-all-content-673.json
    Resolved Path: 6267
  • Aliased Path: @site/../documentation/generic/ring_buffer.md
    Resolved Path: 5381
  • Aliased Path: @theme/DebugRegistry
    Resolved Path: 8165
  • Aliased Path: @theme/DebugSiteMetadata
    Resolved Path: 3767
  • Aliased Path: @site/../documentation/index.md
    Resolved Path: 9068
  • Aliased Path: ~docs/default/version-current-metadata-prop-751.json
    Resolved Path: 1109
  • Aliased Path: @theme/DebugRoutes
    Resolved Path: 7327
  • Aliased Path: @theme/DebugContent
    Resolved Path: 793
  • Aliased Path: /home/runner/work/Extended.Collections/Extended.Collections/docusaurus/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json
    Resolved Path: 3769
  • Aliased Path: @theme/DebugGlobalData
    Resolved Path: 2507
- + \ No newline at end of file diff --git a/__docusaurus/debug/routes.html b/__docusaurus/debug/routes.html index a1530b2..db773cc 100644 --- a/__docusaurus/debug/routes.html +++ b/__docusaurus/debug/routes.html @@ -4,13 +4,13 @@ Docusaurus debug panel - +

Routes

  • /Extended.Collections/__docusaurus/debug
    Is exact: true
  • /Extended.Collections/__docusaurus/debug/config
    Is exact: true
  • /Extended.Collections/__docusaurus/debug/content
    Is exact: true
  • /Extended.Collections/__docusaurus/debug/globalData
    Is exact: true
  • /Extended.Collections/__docusaurus/debug/metadata
    Is exact: true
  • /Extended.Collections/__docusaurus/debug/registry
    Is exact: true
  • /Extended.Collections/__docusaurus/debug/routes
    Is exact: true
  • /Extended.Collections/
    Is exact: false
    Child Routes:
  • *
    Is exact: false
- + \ No newline at end of file diff --git a/assets/js/1f958b60.d2fb1f1c.js b/assets/js/1f958b60.889be298.js similarity index 98% rename from assets/js/1f958b60.d2fb1f1c.js rename to assets/js/1f958b60.889be298.js index bf54b8b..bfb13bc 100644 --- a/assets/js/1f958b60.d2fb1f1c.js +++ b/assets/js/1f958b60.889be298.js @@ -1 +1 @@ -"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[333],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},y=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=l(n),y=i,m=p["".concat(c,".").concat(y)]||p[y]||u[y]||a;return n?r.createElement(m,o(o({ref:t},d),{},{components:n})):r.createElement(m,o({ref:t},d))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=y;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:i,o[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>l});var r=n(7462),i=(n(7294),n(3905));const a={},o="Ordered Dictionary",s={unversionedId:"generic/specialized/ordered_dictionary",id:"generic/specialized/ordered_dictionary",title:"Ordered Dictionary",description:"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.",source:"@site/../documentation/generic/specialized/ordered_dictionary.md",sourceDirName:"generic/specialized",slug:"/generic/specialized/ordered_dictionary",permalink:"/Extended.Collections/generic/specialized/ordered_dictionary",draft:!1,editUrl:"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/specialized/ordered_dictionary.md",tags:[],version:"current",lastUpdatedAt:1694566947,formattedLastUpdatedAt:"Sep 13, 2023",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Introduction",permalink:"/Extended.Collections/"},next:{title:"Ring Buffer",permalink:"/Extended.Collections/generic/ring_buffer"}},c={},l=[{value:"Hypothetical Use Case:",id:"hypothetical-use-case",level:3}],d={toc:l},p="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"ordered-dictionary"},"Ordered Dictionary"),(0,i.kt)("p",null,"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys. "),(0,i.kt)("p",null,"Pros:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Maintains the order of key-value pairs, which can be useful for scenarios where the order of insertion or access is important."),(0,i.kt)("li",{parentName:"ul"},"Provides the functionality of a dictionary, allowing for fast key-based lookups."),(0,i.kt)("li",{parentName:"ul"},"Supports generic TKey and TValue types, making it flexible for various data types.")),(0,i.kt)("p",null,"Cons:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Slightly higher memory usage compared to a regular dictionary due to the need to store the order of items."),(0,i.kt)("li",{parentName:"ul"},"Some operations may be slower compared to a regular dictionary due to maintaining the order.")),(0,i.kt)("h3",{id:"hypothetical-use-case"},"Hypothetical Use Case:"),(0,i.kt)("p",null,"Suppose you are building a task management application, and you need to maintain a list of tasks for a project while preserving the order in which they were added. An OrderedDictionary can be useful in this scenario to store and manage tasks associated with a project."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-csharp",metastring:"file=../../../src/Extended.Collections.Playground/Generic/Specialized/OrderedDictionarySandbox.cs#L2-",file:"../../../src/Extended.Collections.Playground/Generic/Specialized/OrderedDictionarySandbox.cs#L2-"},'using System.Collections;\n\nnamespace Extended.Collections.Playground.Generic.Specialized;\n\npublic class OrderedDictionarySandbox : Sandbox\n{\n private OrderedDictionary m_tasks = new ();\n\n protected override void Run()\n {\n // Add tasks to the project in a specific order.\n m_tasks.Add("Task1", "Complete research");\n m_tasks.Add("Task2", "Write documentation");\n m_tasks.Add("Task3", "Test functionality");\n\n // Access tasks by their keys while maintaining their order.\n Console.WriteLine("Project Tasks:");\n foreach (KeyValuePair entry in m_tasks)\n {\n Console.WriteLine($"TaskId: {entry.Key}");\n Console.WriteLine($"Name:{entry.Value}");\n }\n\n // Remove \n m_tasks.RemoveAt(1); // Remove by index\n m_tasks.Remove("Task1"); // Remove by key \n\n Logger.Information("Value: {Value}", m_tasks);\n // 1. [ \'Task2\' ] = "Write documentation"\n // 2. [ \'Task3\' ] = "Test functionality"\n }\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[333],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>m});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},y=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=l(n),y=i,m=p["".concat(c,".").concat(y)]||p[y]||u[y]||a;return n?r.createElement(m,o(o({ref:t},d),{},{components:n})):r.createElement(m,o({ref:t},d))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=y;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:i,o[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>l});var r=n(7462),i=(n(7294),n(3905));const a={},o="Ordered Dictionary",s={unversionedId:"generic/specialized/ordered_dictionary",id:"generic/specialized/ordered_dictionary",title:"Ordered Dictionary",description:"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.",source:"@site/../documentation/generic/specialized/ordered_dictionary.md",sourceDirName:"generic/specialized",slug:"/generic/specialized/ordered_dictionary",permalink:"/Extended.Collections/generic/specialized/ordered_dictionary",draft:!1,editUrl:"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/specialized/ordered_dictionary.md",tags:[],version:"current",lastUpdatedAt:1694567775,formattedLastUpdatedAt:"Sep 13, 2023",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Introduction",permalink:"/Extended.Collections/"},next:{title:"Ring Buffer",permalink:"/Extended.Collections/generic/ring_buffer"}},c={},l=[{value:"Hypothetical Use Case:",id:"hypothetical-use-case",level:3}],d={toc:l},p="wrapper";function u(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"ordered-dictionary"},"Ordered Dictionary"),(0,i.kt)("p",null,"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys. "),(0,i.kt)("p",null,"Pros:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Maintains the order of key-value pairs, which can be useful for scenarios where the order of insertion or access is important."),(0,i.kt)("li",{parentName:"ul"},"Provides the functionality of a dictionary, allowing for fast key-based lookups."),(0,i.kt)("li",{parentName:"ul"},"Supports generic TKey and TValue types, making it flexible for various data types.")),(0,i.kt)("p",null,"Cons:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Slightly higher memory usage compared to a regular dictionary due to the need to store the order of items."),(0,i.kt)("li",{parentName:"ul"},"Some operations may be slower compared to a regular dictionary due to maintaining the order.")),(0,i.kt)("h3",{id:"hypothetical-use-case"},"Hypothetical Use Case:"),(0,i.kt)("p",null,"Suppose you are building a task management application, and you need to maintain a list of tasks for a project while preserving the order in which they were added. An OrderedDictionary can be useful in this scenario to store and manage tasks associated with a project."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-csharp",metastring:"file=../../../src/Extended.Collections.Playground/Generic/Specialized/OrderedDictionarySandbox.cs#L2-",file:"../../../src/Extended.Collections.Playground/Generic/Specialized/OrderedDictionarySandbox.cs#L2-"},'using System.Collections;\n\nnamespace Extended.Collections.Playground.Generic.Specialized;\n\npublic class OrderedDictionarySandbox : Sandbox\n{\n private OrderedDictionary m_tasks = new ();\n\n protected override void Run()\n {\n // Add tasks to the project in a specific order.\n m_tasks.Add("Task1", "Complete research");\n m_tasks.Add("Task2", "Write documentation");\n m_tasks.Add("Task3", "Test functionality");\n\n // Access tasks by their keys while maintaining their order.\n Console.WriteLine("Project Tasks:");\n foreach (KeyValuePair entry in m_tasks)\n {\n Console.WriteLine($"TaskId: {entry.Key}");\n Console.WriteLine($"Name:{entry.Value}");\n }\n\n // Remove \n m_tasks.RemoveAt(1); // Remove by index\n m_tasks.Remove("Task1"); // Remove by key \n\n Logger.Information("Value: {Value}", m_tasks);\n // 1. [ \'Task2\' ] = "Write documentation"\n // 2. [ \'Task3\' ] = "Test functionality"\n }\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/246f2c6f.6e41c7fd.js b/assets/js/246f2c6f.aef5e074.js similarity index 93% rename from assets/js/246f2c6f.6e41c7fd.js rename to assets/js/246f2c6f.aef5e074.js index cfb3145..8395410 100644 --- a/assets/js/246f2c6f.6e41c7fd.js +++ b/assets/js/246f2c6f.aef5e074.js @@ -1 +1 @@ -"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[285],{6267:e=>{e.exports=JSON.parse('{"docusaurus-plugin-debug":{},"docusaurus-theme-classic":{},"docusaurus-plugin-sitemap":{},"docusaurus-plugin-content-docs":{"default":{"loadedVersions":[{"versionName":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","path":"/Extended.Collections/","tagsPath":"/Extended.Collections/tags","isLast":true,"routePriority":-1,"contentPath":"/home/runner/work/Extended.Collections/Extended.Collections/documentation","contentPathLocalized":"/home/runner/work/Extended.Collections/Extended.Collections/docusaurus/i18n/en/docusaurus-plugin-content-docs/current","docs":[{"unversionedId":"generic/ring_buffer","id":"generic/ring_buffer","title":"Ring Buffer","description":"A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.","source":"@site/../documentation/generic/ring_buffer.md","sourceDirName":"generic","slug":"/generic/ring_buffer","permalink":"/Extended.Collections/generic/ring_buffer","draft":false,"editUrl":"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/ring_buffer.md","tags":[],"version":"current","lastUpdatedAt":1694566947,"formattedLastUpdatedAt":"Sep 13, 2023","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Ordered Dictionary","permalink":"/Extended.Collections/generic/specialized/ordered_dictionary"}},{"unversionedId":"generic/specialized/ordered_dictionary","id":"generic/specialized/ordered_dictionary","title":"Ordered Dictionary","description":"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.","source":"@site/../documentation/generic/specialized/ordered_dictionary.md","sourceDirName":"generic/specialized","slug":"/generic/specialized/ordered_dictionary","permalink":"/Extended.Collections/generic/specialized/ordered_dictionary","draft":false,"editUrl":"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/specialized/ordered_dictionary.md","tags":[],"version":"current","lastUpdatedAt":1694566947,"formattedLastUpdatedAt":"Sep 13, 2023","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Introduction","permalink":"/Extended.Collections/"},"next":{"title":"Ring Buffer","permalink":"/Extended.Collections/generic/ring_buffer"}},{"unversionedId":"index","id":"index","title":"Introduction","description":"Collections Extended a zero dependency netstandard library that contains an array of different generic collections to use in any application. Each collection has it\'s own use","source":"@site/../documentation/index.md","sourceDirName":".","slug":"/","permalink":"/Extended.Collections/","draft":false,"editUrl":"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/index.md","tags":[],"version":"current","lastUpdatedAt":1694566947,"formattedLastUpdatedAt":"Sep 13, 2023","sidebarPosition":1,"frontMatter":{"sidebar_position":1},"sidebar":"defaultSidebar","next":{"title":"Ordered Dictionary","permalink":"/Extended.Collections/generic/specialized/ordered_dictionary"}}],"drafts":[],"sidebars":{"defaultSidebar":[{"type":"doc","id":"index"},{"type":"category","label":"Generic","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Specialized","collapsible":true,"collapsed":true,"items":[{"type":"doc","id":"generic/specialized/ordered_dictionary"}]},{"type":"doc","id":"generic/ring_buffer"}]}]}}]}},"docusaurus-bootstrap-plugin":{},"docusaurus-mdx-fallback-plugin":{}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[285],{6267:e=>{e.exports=JSON.parse('{"docusaurus-plugin-debug":{},"docusaurus-theme-classic":{},"docusaurus-plugin-sitemap":{},"docusaurus-plugin-content-docs":{"default":{"loadedVersions":[{"versionName":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","path":"/Extended.Collections/","tagsPath":"/Extended.Collections/tags","isLast":true,"routePriority":-1,"contentPath":"/home/runner/work/Extended.Collections/Extended.Collections/documentation","contentPathLocalized":"/home/runner/work/Extended.Collections/Extended.Collections/docusaurus/i18n/en/docusaurus-plugin-content-docs/current","docs":[{"unversionedId":"generic/ring_buffer","id":"generic/ring_buffer","title":"Ring Buffer","description":"A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.","source":"@site/../documentation/generic/ring_buffer.md","sourceDirName":"generic","slug":"/generic/ring_buffer","permalink":"/Extended.Collections/generic/ring_buffer","draft":false,"editUrl":"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/ring_buffer.md","tags":[],"version":"current","lastUpdatedAt":1694567775,"formattedLastUpdatedAt":"Sep 13, 2023","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Ordered Dictionary","permalink":"/Extended.Collections/generic/specialized/ordered_dictionary"}},{"unversionedId":"generic/specialized/ordered_dictionary","id":"generic/specialized/ordered_dictionary","title":"Ordered Dictionary","description":"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.","source":"@site/../documentation/generic/specialized/ordered_dictionary.md","sourceDirName":"generic/specialized","slug":"/generic/specialized/ordered_dictionary","permalink":"/Extended.Collections/generic/specialized/ordered_dictionary","draft":false,"editUrl":"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/specialized/ordered_dictionary.md","tags":[],"version":"current","lastUpdatedAt":1694567775,"formattedLastUpdatedAt":"Sep 13, 2023","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Introduction","permalink":"/Extended.Collections/"},"next":{"title":"Ring Buffer","permalink":"/Extended.Collections/generic/ring_buffer"}},{"unversionedId":"index","id":"index","title":"Introduction","description":"Collections Extended a zero dependency netstandard library that contains an array of different generic collections to use in any application. Each collection has it\'s own use","source":"@site/../documentation/index.md","sourceDirName":".","slug":"/","permalink":"/Extended.Collections/","draft":false,"editUrl":"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/index.md","tags":[],"version":"current","lastUpdatedAt":1694567775,"formattedLastUpdatedAt":"Sep 13, 2023","sidebarPosition":1,"frontMatter":{"sidebar_position":1},"sidebar":"defaultSidebar","next":{"title":"Ordered Dictionary","permalink":"/Extended.Collections/generic/specialized/ordered_dictionary"}}],"drafts":[],"sidebars":{"defaultSidebar":[{"type":"doc","id":"index"},{"type":"category","label":"Generic","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Specialized","collapsible":true,"collapsed":true,"items":[{"type":"doc","id":"generic/specialized/ordered_dictionary"}]},{"type":"doc","id":"generic/ring_buffer"}]}]}}]}},"docusaurus-bootstrap-plugin":{},"docusaurus-mdx-fallback-plugin":{}}')}}]); \ No newline at end of file diff --git a/assets/js/418073dd.6582d765.js b/assets/js/418073dd.acbe7b3f.js similarity index 98% rename from assets/js/418073dd.6582d765.js rename to assets/js/418073dd.acbe7b3f.js index 69b729b..fa6bbdd 100644 --- a/assets/js/418073dd.6582d765.js +++ b/assets/js/418073dd.acbe7b3f.js @@ -1 +1 @@ -"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[21],{3905:(e,r,n)=>{n.d(r,{Zo:()=>u,kt:()=>g});var t=n(7294);function o(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function i(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function f(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=t.createContext({}),l=function(e){var r=t.useContext(c),n=r;return e&&(n="function"==typeof e?e(r):f(f({},r),e)),n},u=function(e){var r=l(e.components);return t.createElement(c.Provider,{value:r},e.children)},d="mdxType",s={inlineCode:"code",wrapper:function(e){var r=e.children;return t.createElement(t.Fragment,{},r)}},p=t.forwardRef((function(e,r){var n=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,u=a(e,["components","mdxType","originalType","parentName"]),d=l(n),p=o,g=d["".concat(c,".").concat(p)]||d[p]||s[p]||i;return n?t.createElement(g,f(f({ref:r},u),{},{components:n})):t.createElement(g,f({ref:r},u))}));function g(e,r){var n=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var i=n.length,f=new Array(i);f[0]=p;var a={};for(var c in r)hasOwnProperty.call(r,c)&&(a[c]=r[c]);a.originalType=e,a[d]="string"==typeof e?e:o,f[1]=a;for(var l=2;l{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>f,default:()=>s,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var t=n(7462),o=(n(7294),n(3905));const i={},f="Ring Buffer",a={unversionedId:"generic/ring_buffer",id:"generic/ring_buffer",title:"Ring Buffer",description:"A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.",source:"@site/../documentation/generic/ring_buffer.md",sourceDirName:"generic",slug:"/generic/ring_buffer",permalink:"/Extended.Collections/generic/ring_buffer",draft:!1,editUrl:"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/ring_buffer.md",tags:[],version:"current",lastUpdatedAt:1694566947,formattedLastUpdatedAt:"Sep 13, 2023",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Ordered Dictionary",permalink:"/Extended.Collections/generic/specialized/ordered_dictionary"}},c={},l=[],u={toc:l},d="wrapper";function s(e){let{components:r,...n}=e;return(0,o.kt)(d,(0,t.Z)({},u,n,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"ring-buffer"},"Ring Buffer"),(0,o.kt)("p",null,"A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-csharp",metastring:"file=../../src/Extended.Collections.Playground/Generic/RingBufferSandbox.cs#L2-",file:"../../src/Extended.Collections.Playground/Generic/RingBufferSandbox.cs#L2-"},'using Extended.Collections.Generic;\n\npublic class RingBufferSandbox : Sandbox\n{\n private readonly RingBuffer m_buffer = new (3);\n\n protected override void Run()\n {\n m_buffer.Add("A");\n m_buffer.Add("B");\n m_buffer.Add("C");\n Logger.Information("1. {Buffer}", m_buffer); // 1. [ "A", "B", "C" ]\n\n m_buffer.Add("D");\n Logger.Information("2. {Buffer}", m_buffer); // 2. [ "B", "C", "D" ]\n\n m_buffer.Remove("C");\n Logger.Information("3. {Buffer}", m_buffer); // 3. [ "B", "D" ]\n\n m_buffer.Add("E");\n Logger.Information("4. {Buffer}", m_buffer); // 4. [ "B", "D", "E" ]\n\n m_buffer.Clear();\n Logger.Information("5. {Buffer}", m_buffer); // [ ]\n }\n}\n')))}s.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[21],{3905:(e,r,n)=>{n.d(r,{Zo:()=>u,kt:()=>g});var t=n(7294);function o(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function i(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function f(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=t.createContext({}),l=function(e){var r=t.useContext(c),n=r;return e&&(n="function"==typeof e?e(r):f(f({},r),e)),n},u=function(e){var r=l(e.components);return t.createElement(c.Provider,{value:r},e.children)},d="mdxType",s={inlineCode:"code",wrapper:function(e){var r=e.children;return t.createElement(t.Fragment,{},r)}},p=t.forwardRef((function(e,r){var n=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,u=a(e,["components","mdxType","originalType","parentName"]),d=l(n),p=o,g=d["".concat(c,".").concat(p)]||d[p]||s[p]||i;return n?t.createElement(g,f(f({ref:r},u),{},{components:n})):t.createElement(g,f({ref:r},u))}));function g(e,r){var n=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var i=n.length,f=new Array(i);f[0]=p;var a={};for(var c in r)hasOwnProperty.call(r,c)&&(a[c]=r[c]);a.originalType=e,a[d]="string"==typeof e?e:o,f[1]=a;for(var l=2;l{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>f,default:()=>s,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var t=n(7462),o=(n(7294),n(3905));const i={},f="Ring Buffer",a={unversionedId:"generic/ring_buffer",id:"generic/ring_buffer",title:"Ring Buffer",description:"A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.",source:"@site/../documentation/generic/ring_buffer.md",sourceDirName:"generic",slug:"/generic/ring_buffer",permalink:"/Extended.Collections/generic/ring_buffer",draft:!1,editUrl:"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/generic/ring_buffer.md",tags:[],version:"current",lastUpdatedAt:1694567775,formattedLastUpdatedAt:"Sep 13, 2023",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"Ordered Dictionary",permalink:"/Extended.Collections/generic/specialized/ordered_dictionary"}},c={},l=[],u={toc:l},d="wrapper";function s(e){let{components:r,...n}=e;return(0,o.kt)(d,(0,t.Z)({},u,n,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"ring-buffer"},"Ring Buffer"),(0,o.kt)("p",null,"A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-csharp",metastring:"file=../../src/Extended.Collections.Playground/Generic/RingBufferSandbox.cs#L2-",file:"../../src/Extended.Collections.Playground/Generic/RingBufferSandbox.cs#L2-"},'using Extended.Collections.Generic;\n\npublic class RingBufferSandbox : Sandbox\n{\n private readonly RingBuffer m_buffer = new (3);\n\n protected override void Run()\n {\n m_buffer.Add("A");\n m_buffer.Add("B");\n m_buffer.Add("C");\n Logger.Information("1. {Buffer}", m_buffer); // 1. [ "A", "B", "C" ]\n\n m_buffer.Add("D");\n Logger.Information("2. {Buffer}", m_buffer); // 2. [ "B", "C", "D" ]\n\n m_buffer.Remove("C");\n Logger.Information("3. {Buffer}", m_buffer); // 3. [ "B", "D" ]\n\n m_buffer.Add("E");\n Logger.Information("4. {Buffer}", m_buffer); // 4. [ "B", "D", "E" ]\n\n m_buffer.Clear();\n Logger.Information("5. {Buffer}", m_buffer); // [ ]\n }\n}\n')))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8cbb5538.d02c2c0b.js b/assets/js/8cbb5538.b302ad8e.js similarity index 98% rename from assets/js/8cbb5538.d02c2c0b.js rename to assets/js/8cbb5538.b302ad8e.js index e82008c..6448a80 100644 --- a/assets/js/8cbb5538.d02c2c0b.js +++ b/assets/js/8cbb5538.b302ad8e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[192],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>y});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),d=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=d(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),p=d(n),f=a,y=p["".concat(c,".").concat(f)]||p[f]||u[f]||i;return n?r.createElement(y,o(o({ref:t},s),{},{components:n})):r.createElement(y,o({ref:t},s))}));function y(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[p]="string"==typeof e?e:a,o[1]=l;for(var d=2;d{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var r=n(7462),a=(n(7294),n(3905));const i={sidebar_position:1},o="Introduction",l={unversionedId:"index",id:"index",title:"Introduction",description:"Collections Extended a zero dependency netstandard library that contains an array of different generic collections to use in any application. Each collection has it's own use",source:"@site/../documentation/index.md",sourceDirName:".",slug:"/",permalink:"/Extended.Collections/",draft:!1,editUrl:"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/index.md",tags:[],version:"current",lastUpdatedAt:1694566947,formattedLastUpdatedAt:"Sep 13, 2023",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"defaultSidebar",next:{title:"Ordered Dictionary",permalink:"/Extended.Collections/generic/specialized/ordered_dictionary"}},c={},d=[{value:"Collections",id:"collections",level:2}],s={toc:d},p="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"introduction"},"Introduction"),(0,a.kt)("p",null,"Collections Extended a zero dependency ",(0,a.kt)("em",{parentName:"p"},"netstandard")," library that contains an array of different generic collections to use in any application. Each collection has it's own use\ncase and is fully covered in unit tests giving you confidence they they work. "),(0,a.kt)("p",null,"Have a collection type that you would want to add? Feel free to make a pull request."),(0,a.kt)("h2",{id:"collections"},"Collections"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Type Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/Extended.Collections/generic/ring_buffer"},"Ring Buffer")),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Collections.Extended.Generic.RingBuffer")),(0,a.kt)("td",{parentName:"tr",align:null},"A ring buffer efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/Extended.Collections/generic/specialized/ordered_dictionary"},"OrderedDictionary")),(0,a.kt)("td",{parentName:"tr",align:null},"'Extended.Collections.Generic.Specialized.OrderedDictionary"),(0,a.kt)("td",{parentName:"tr",align:null},"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.")))))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkextended_collections=self.webpackChunkextended_collections||[]).push([[192],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>y});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),d=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=d(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),p=d(n),f=a,y=p["".concat(c,".").concat(f)]||p[f]||u[f]||i;return n?r.createElement(y,o(o({ref:t},s),{},{components:n})):r.createElement(y,o({ref:t},s))}));function y(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[p]="string"==typeof e?e:a,o[1]=l;for(var d=2;d{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>d});var r=n(7462),a=(n(7294),n(3905));const i={sidebar_position:1},o="Introduction",l={unversionedId:"index",id:"index",title:"Introduction",description:"Collections Extended a zero dependency netstandard library that contains an array of different generic collections to use in any application. Each collection has it's own use",source:"@site/../documentation/index.md",sourceDirName:".",slug:"/",permalink:"/Extended.Collections/",draft:!1,editUrl:"https://github.com/ByronMayne/Extended.Collections/edit/main/documentation/index.md",tags:[],version:"current",lastUpdatedAt:1694567775,formattedLastUpdatedAt:"Sep 13, 2023",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"defaultSidebar",next:{title:"Ordered Dictionary",permalink:"/Extended.Collections/generic/specialized/ordered_dictionary"}},c={},d=[{value:"Collections",id:"collections",level:2}],s={toc:d},p="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"introduction"},"Introduction"),(0,a.kt)("p",null,"Collections Extended a zero dependency ",(0,a.kt)("em",{parentName:"p"},"netstandard")," library that contains an array of different generic collections to use in any application. Each collection has it's own use\ncase and is fully covered in unit tests giving you confidence they they work. "),(0,a.kt)("p",null,"Have a collection type that you would want to add? Feel free to make a pull request."),(0,a.kt)("h2",{id:"collections"},"Collections"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Type Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/Extended.Collections/generic/ring_buffer"},"Ring Buffer")),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Collections.Extended.Generic.RingBuffer")),(0,a.kt)("td",{parentName:"tr",align:null},"A ring buffer efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/Extended.Collections/generic/specialized/ordered_dictionary"},"OrderedDictionary")),(0,a.kt)("td",{parentName:"tr",align:null},"'Extended.Collections.Generic.Specialized.OrderedDictionary"),(0,a.kt)("td",{parentName:"tr",align:null},"Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.")))))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.77bc56a1.js b/assets/js/runtime~main.77bc56a1.js new file mode 100644 index 0000000..b77be3c --- /dev/null +++ b/assets/js/runtime~main.77bc56a1.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,t,r,o,n,a={},d={};function f(e){var t=d[e];if(void 0!==t)return t.exports;var r=d[e]={exports:{}};return a[e].call(r.exports,r,r.exports,f),r.exports}f.m=a,e=[],f.O=(t,r,o,n)=>{if(!r){var a=1/0;for(l=0;l=n)&&Object.keys(f.O).every((e=>f.O[e](r[i])))?r.splice(i--,1):(d=!1,n0&&e[l-1][2]>n;l--)e[l]=e[l-1];e[l]=[r,o,n]},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var n=Object.create(null);f.r(n);var a={};t=t||[null,r({}),r([]),r(r)];for(var d=2&o&&e;"object"==typeof d&&!~t.indexOf(d);d=r(d))Object.getOwnPropertyNames(d).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,f.d(n,a),n},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((t,r)=>(f.f[r](e,t),t)),[])),f.u=e=>"assets/js/"+({21:"418073dd",53:"935f2afb",102:"6794d4cd",127:"ede3a018",192:"8cbb5538",285:"246f2c6f",333:"1f958b60",514:"1be78505",524:"e26cfe93",609:"15f4476d",616:"946bd85a",627:"23abe487",843:"68e633d4",918:"17896441",983:"ba8b3534"}[e]||e)+"."+{21:"acbe7b3f",53:"39d66f58",102:"88571500",127:"1a4ef5de",192:"b302ad8e",285:"aef5e074",333:"889be298",368:"cf67e7b1",514:"712442a1",524:"b9e519eb",609:"d5f9555a",616:"b86f1f03",627:"5c18fe8c",843:"781ef39d",918:"1ce773d5",972:"6f65d534",983:"4901bbe6"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},n="extended-collections:",f.l=(e,t,r,a)=>{if(o[e])o[e].push(t);else{var d,i;if(void 0!==r)for(var c=document.getElementsByTagName("script"),l=0;l{d.onerror=d.onload=null,clearTimeout(b);var n=o[e];if(delete o[e],d.parentNode&&d.parentNode.removeChild(d),n&&n.forEach((e=>e(r))),t)return t(r)},b=setTimeout(s.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=s.bind(null,d.onerror),d.onload=s.bind(null,d.onload),i&&document.head.appendChild(d)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/Extended.Collections/",f.gca=function(e){return e={17896441:"918","418073dd":"21","935f2afb":"53","6794d4cd":"102",ede3a018:"127","8cbb5538":"192","246f2c6f":"285","1f958b60":"333","1be78505":"514",e26cfe93:"524","15f4476d":"609","946bd85a":"616","23abe487":"627","68e633d4":"843",ba8b3534:"983"}[e]||e,f.p+f.u(e)},(()=>{var e={303:0,532:0};f.f.j=(t,r)=>{var o=f.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var n=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=n);var a=f.p+f.u(t),d=new Error;f.l(a,(r=>{if(f.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;d.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",d.name="ChunkLoadError",d.type=n,d.request=a,o[1](d)}}),"chunk-"+t,t)}},f.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,a=r[0],d=r[1],i=r[2],c=0;if(a.some((t=>0!==e[t]))){for(o in d)f.o(d,o)&&(f.m[o]=d[o]);if(i)var l=i(f)}for(t&&t(r);c{"use strict";var e,t,r,o,n,a={},f={};function i(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={exports:{}};return a[e].call(r.exports,r,r.exports,i),r.exports}i.m=a,e=[],i.O=(t,r,o,n)=>{if(!r){var a=1/0;for(l=0;l=n)&&Object.keys(i.O).every((e=>i.O[e](r[d])))?r.splice(d--,1):(f=!1,n0&&e[l-1][2]>n;l--)e[l]=e[l-1];e[l]=[r,o,n]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var n=Object.create(null);i.r(n);var a={};t=t||[null,r({}),r([]),r(r)];for(var f=2&o&&e;"object"==typeof f&&!~t.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,i.d(n,a),n},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>"assets/js/"+({21:"418073dd",53:"935f2afb",102:"6794d4cd",127:"ede3a018",192:"8cbb5538",285:"246f2c6f",333:"1f958b60",514:"1be78505",524:"e26cfe93",609:"15f4476d",616:"946bd85a",627:"23abe487",843:"68e633d4",918:"17896441",983:"ba8b3534"}[e]||e)+"."+{21:"6582d765",53:"39d66f58",102:"88571500",127:"1a4ef5de",192:"d02c2c0b",285:"6e41c7fd",333:"d2fb1f1c",368:"cf67e7b1",514:"712442a1",524:"b9e519eb",609:"d5f9555a",616:"b86f1f03",627:"5c18fe8c",843:"781ef39d",918:"1ce773d5",972:"6f65d534",983:"4901bbe6"}[e]+".js",i.miniCssF=e=>{},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},n="extended-collections:",i.l=(e,t,r,a)=>{if(o[e])o[e].push(t);else{var f,d;if(void 0!==r)for(var c=document.getElementsByTagName("script"),l=0;l{f.onerror=f.onload=null,clearTimeout(b);var n=o[e];if(delete o[e],f.parentNode&&f.parentNode.removeChild(f),n&&n.forEach((e=>e(r))),t)return t(r)},b=setTimeout(s.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=s.bind(null,f.onerror),f.onload=s.bind(null,f.onload),d&&document.head.appendChild(f)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="/Extended.Collections/",i.gca=function(e){return e={17896441:"918","418073dd":"21","935f2afb":"53","6794d4cd":"102",ede3a018:"127","8cbb5538":"192","246f2c6f":"285","1f958b60":"333","1be78505":"514",e26cfe93:"524","15f4476d":"609","946bd85a":"616","23abe487":"627","68e633d4":"843",ba8b3534:"983"}[e]||e,i.p+i.u(e)},(()=>{var e={303:0,532:0};i.f.j=(t,r)=>{var o=i.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var n=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=n);var a=i.p+i.u(t),f=new Error;i.l(a,(r=>{if(i.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;f.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",f.name="ChunkLoadError",f.type=n,f.request=a,o[1](f)}}),"chunk-"+t,t)}},i.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,a=r[0],f=r[1],d=r[2],c=0;if(a.some((t=>0!==e[t]))){for(o in f)i.o(f,o)&&(i.m[o]=f[o]);if(d)var l=d(i)}for(t&&t(r);c Ring Buffer | Extended.Collections - +
-

Ring Buffer

A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.

using Extended.Collections.Generic;

public class RingBufferSandbox : Sandbox
{
private readonly RingBuffer<string> m_buffer = new (3);

protected override void Run()
{
m_buffer.Add("A");
m_buffer.Add("B");
m_buffer.Add("C");
Logger.Information("1. {Buffer}", m_buffer); // 1. [ "A", "B", "C" ]

m_buffer.Add("D");
Logger.Information("2. {Buffer}", m_buffer); // 2. [ "B", "C", "D" ]

m_buffer.Remove("C");
Logger.Information("3. {Buffer}", m_buffer); // 3. [ "B", "D" ]

m_buffer.Add("E");
Logger.Information("4. {Buffer}", m_buffer); // 4. [ "B", "D", "E" ]

m_buffer.Clear();
Logger.Information("5. {Buffer}", m_buffer); // [ ]
}
}
- +

Ring Buffer

A ring buffer is a data structure that efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.

using Extended.Collections.Generic;

public class RingBufferSandbox : Sandbox
{
private readonly RingBuffer<string> m_buffer = new (3);

protected override void Run()
{
m_buffer.Add("A");
m_buffer.Add("B");
m_buffer.Add("C");
Logger.Information("1. {Buffer}", m_buffer); // 1. [ "A", "B", "C" ]

m_buffer.Add("D");
Logger.Information("2. {Buffer}", m_buffer); // 2. [ "B", "C", "D" ]

m_buffer.Remove("C");
Logger.Information("3. {Buffer}", m_buffer); // 3. [ "B", "D" ]

m_buffer.Add("E");
Logger.Information("4. {Buffer}", m_buffer); // 4. [ "B", "D", "E" ]

m_buffer.Clear();
Logger.Information("5. {Buffer}", m_buffer); // [ ]
}
}
+ \ No newline at end of file diff --git a/generic/specialized/ordered_dictionary.html b/generic/specialized/ordered_dictionary.html index c5fcd9a..305ea2e 100644 --- a/generic/specialized/ordered_dictionary.html +++ b/generic/specialized/ordered_dictionary.html @@ -4,13 +4,13 @@ Ordered Dictionary | Extended.Collections - +
-

Ordered Dictionary

Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.

Pros:

  • Maintains the order of key-value pairs, which can be useful for scenarios where the order of insertion or access is important.
  • Provides the functionality of a dictionary, allowing for fast key-based lookups.
  • Supports generic TKey and TValue types, making it flexible for various data types.

Cons:

  • Slightly higher memory usage compared to a regular dictionary due to the need to store the order of items.
  • Some operations may be slower compared to a regular dictionary due to maintaining the order.

Hypothetical Use Case:

Suppose you are building a task management application, and you need to maintain a list of tasks for a project while preserving the order in which they were added. An OrderedDictionary can be useful in this scenario to store and manage tasks associated with a project.

using System.Collections;

namespace Extended.Collections.Playground.Generic.Specialized;

public class OrderedDictionarySandbox : Sandbox
{
private OrderedDictionary<string, string> m_tasks = new ();

protected override void Run()
{
// Add tasks to the project in a specific order.
m_tasks.Add("Task1", "Complete research");
m_tasks.Add("Task2", "Write documentation");
m_tasks.Add("Task3", "Test functionality");

// Access tasks by their keys while maintaining their order.
Console.WriteLine("Project Tasks:");
foreach (KeyValuePair<string, string> entry in m_tasks)
{
Console.WriteLine($"TaskId: {entry.Key}");
Console.WriteLine($"Name:{entry.Value}");
}

// Remove
m_tasks.RemoveAt(1); // Remove by index
m_tasks.Remove("Task1"); // Remove by key

Logger.Information("Value: {Value}", m_tasks);
// 1. [ 'Task2' ] = "Write documentation"
// 2. [ 'Task3' ] = "Test functionality"
}
}
- +

Ordered Dictionary

Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.

Pros:

  • Maintains the order of key-value pairs, which can be useful for scenarios where the order of insertion or access is important.
  • Provides the functionality of a dictionary, allowing for fast key-based lookups.
  • Supports generic TKey and TValue types, making it flexible for various data types.

Cons:

  • Slightly higher memory usage compared to a regular dictionary due to the need to store the order of items.
  • Some operations may be slower compared to a regular dictionary due to maintaining the order.

Hypothetical Use Case:

Suppose you are building a task management application, and you need to maintain a list of tasks for a project while preserving the order in which they were added. An OrderedDictionary can be useful in this scenario to store and manage tasks associated with a project.

using System.Collections;

namespace Extended.Collections.Playground.Generic.Specialized;

public class OrderedDictionarySandbox : Sandbox
{
private OrderedDictionary<string, string> m_tasks = new ();

protected override void Run()
{
// Add tasks to the project in a specific order.
m_tasks.Add("Task1", "Complete research");
m_tasks.Add("Task2", "Write documentation");
m_tasks.Add("Task3", "Test functionality");

// Access tasks by their keys while maintaining their order.
Console.WriteLine("Project Tasks:");
foreach (KeyValuePair<string, string> entry in m_tasks)
{
Console.WriteLine($"TaskId: {entry.Key}");
Console.WriteLine($"Name:{entry.Value}");
}

// Remove
m_tasks.RemoveAt(1); // Remove by index
m_tasks.Remove("Task1"); // Remove by key

Logger.Information("Value: {Value}", m_tasks);
// 1. [ 'Task2' ] = "Write documentation"
// 2. [ 'Task3' ] = "Test functionality"
}
}
+ \ No newline at end of file diff --git a/index.html b/index.html index d0118f7..e8cc441 100644 --- a/index.html +++ b/index.html @@ -4,14 +4,14 @@ Introduction | Extended.Collections - +

Introduction

Collections Extended a zero dependency netstandard library that contains an array of different generic collections to use in any application. Each collection has it's own use -case and is fully covered in unit tests giving you confidence they they work.

Have a collection type that you would want to add? Feel free to make a pull request.

Collections

NameType NameDescription
Ring BufferCollections.Extended.Generic.RingBuffer<T>A ring buffer efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.
OrderedDictionary'Extended.Collections.Generic.Specialized.OrderedDictionary<TKey, TValue>Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.
- +case and is fully covered in unit tests giving you confidence they they work.

Have a collection type that you would want to add? Feel free to make a pull request.

Collections

NameType NameDescription
Ring BufferCollections.Extended.Generic.RingBuffer<T>A ring buffer efficiently manages a fixed-size, cyclically-referenced buffer, allowing for constant-time insertions and removals while overwriting the oldest data when full.
OrderedDictionary'Extended.Collections.Generic.Specialized.OrderedDictionary<TKey, TValue>Combines the features of a dictionary and a list, allowing key-value pairs to be stored in a specific order and accessed efficiently by their keys.
+ \ No newline at end of file