{"id":1516,"date":"2019-11-16T23:16:35","date_gmt":"2019-11-16T23:16:35","guid":{"rendered":"https:\/\/docs.sisus.co\/power-inspector\/?p=1516"},"modified":"2019-11-16T23:16:35","modified_gmt":"2019-11-16T23:16:35","slug":"targetable","status":"publish","type":"post","link":"https:\/\/docs.sisus.co\/power-inspector\/attributes\/targetable\/","title":{"rendered":"Targetable"},"content":{"rendered":"<p>A base class for attributes that enables them to specify whether they target a collection or the members of the collection, when the attribute is added before a collection class member.<br \/>\nImplements the ITargetableAttribute interface.<\/p>\n<h2>Attribute Target<\/h2>\n<p>Field, property, indexer, method return value or method parameter.<\/p>\n<h2>Example<\/h2>\n<pre>using System;\r\n\r\nnamespace Sisus.Attributes\r\n{\r\n\t\/\/\/ &lt;summary&gt;\r\n\t\/\/\/ Attribute that specifies that its target should be drawn as a non-editable read-only field.\r\n\t\/\/\/ &lt;\/summary&gt;\r\n\t[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = false, Inherited = false)]\r\n\tpublic class ReadOnlyAttribute : TargetableAttribute\r\n\t{\r\n\t\tpublic ReadOnlyAttribute() : base() { }\r\n\r\n\t\tpublic ReadOnlyAttribute(Target attributeTarget) : base(attributeTarget) { }\r\n\t}\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A base class for attributes that enables them to specify whether they target a collection or the members of the collection, when the attribute is added before a collection class member. Implements the ITargetableAttribute interface. Attribute Target Field, property, indexer, method return value or method parameter. Example using System; namespace Sisus.Attributes { \/\/\/ &lt;summary&gt; \/\/\/ ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/docs.sisus.co\/power-inspector\/attributes\/targetable\/\" title=\"read more\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/posts\/1516"}],"collection":[{"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/comments?post=1516"}],"version-history":[{"count":1,"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/posts\/1516\/revisions"}],"predecessor-version":[{"id":1523,"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/posts\/1516\/revisions\/1523"}],"wp:attachment":[{"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/media?parent=1516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/categories?post=1516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.sisus.co\/power-inspector\/wp-json\/wp\/v2\/tags?post=1516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}