csharp_reflect

package module
v0.0.0-...-1874613 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2020 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

CSHARP-REFLECT 0.1.0

What is it?

This tool allows for a developer to set build C# classes for use elsewhere.

Example

import csharp "github.com/ptdave20/csharp-reflect"
    options := csharp.New()
    options.OutputPath = "./Output"
    csharp.ConvertObject(YourClass,options)

Todo

  • Add JsonProperty support
  • Add BsonProperty support
  • Code templating
  • Create CLI
  • Better error handling

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertObject

func ConvertObject(t interface{}, options *Options)

func ConvertType

func ConvertType(t reflect.Type, options *Options)

Types

type INDENT

type INDENT int
const (
	INDENT_TAB INDENT = iota
	INDENT_SPACE
)

type Options

type Options struct {
	Namespace           string
	JsonProperty        bool
	OverrideListToArray bool

	BaseUsings     []string
	IndentType     INDENT
	IndentSpacing  int
	OutputPath     string
	SingleFile     bool
	Converted      map[reflect.Type]bool
	SortProperties bool
	// contains filtered or unexported fields
}

func New

func New(namespace string) *Options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址