コード例 #1
0
        public async Task <IActionResult> Create([FromBody] $safeitemname$ record)
        {
            await genericRepository.AddOneAsync(record);

            // This approach assumes you will be passing a valid action name to the controller.
            return(CreatedAtAction(createdAtActionName, new { id = record.Id }, record));
        }
コード例 #2
0
 public MyToolSettings($safeitemname$ command)
 {
     m_command = command;
     $safeitemname$UserControl = new $safeitemname$UC();
     this.Content = $safeitemname$UserControl;
     this.Title   = "$safeitemname$ Tool Settings";
 }
コード例 #3
0
        /// <summary>
        /// Deserializes a $safeitemname$ object from intermediate XML format.
        /// </summary>
        /// <param name="input">Location of the intermediate XML and various deserialization helpers.</param>
        /// <param name="format">Specifies the intermediate source XML format.</param>
        /// <param name="existingInstance">The strongly typed object containing the received data, or null if the
        /// deserializer should construct a new instance.</param>
        /// <returns>A deserialized $safeitemname$ instance.</returns>
        protected override $safeitemname$ Deserialize(IntermediateReader input, ContentSerializerAttribute format, $safeitemname$ existingInstance)
        {
            $safeitemname$ value = existingInstance ?? default($safeitemname$);

            // TODO deserialize $safeitemname$ fields & properties...

            return value;
        }
コード例 #4
0
        /// <summary>
        /// Deserializes a $safeitemname$ object from intermediate XML format.
        /// </summary>
        /// <param name="input">Location of the intermediate XML and various deserialization helpers.</param>
        /// <param name="format">Specifies the intermediate source XML format.</param>
        /// <param name="existingInstance">The strongly typed object containing the received data, or null if the
        /// deserializer should construct a new instance.</param>
        /// <returns>A deserialized $safeitemname$ instance.</returns>
        protected override $safeitemname$ Deserialize(IntermediateReader input, ContentSerializerAttribute format, $safeitemname$ existingInstance)
        {
            $safeitemname$ value = existingInstance ?? default($safeitemname$);

            // TODO deserialize $safeitemname$ fields & properties...

            return(value);
        }
コード例 #5
0
ファイル: EmitterTemplate.cs プロジェクト: mnjstwins/mpe
        /// <summary>
        /// Copies the properties of this instance into the specified existing instance.
        /// </summary>
        /// <param name="exisitingInstance">An existing emitter instance.</param>
        protected override AbstractEmitter DeepCopy(AbstractEmitter exisitingInstance)
        {
            $safeitemname$ value = (exisitingInstance as $safeitemname$) ?? default($safeitemname$);

            // TODO copy implementation specific fields & properties...

            base.DeepCopy(value);

            return(value);
        }
コード例 #6
0
        public async Task <IActionResult> ReplaceDocument(string id, [FromBody] $safeitemname$ record)
        {
            if (id != record.Id)
            {
                return(BadRequest());
            }

            var rec = await genericRepository.ReplaceOneAndGetAsync <$safeitemname$>(id, record);

            return(Ok(rec));
        }
コード例 #7
0
ファイル: Dialog.cs プロジェクト: scovetta/AI
            : base(nameof($safeitemname$), services, responseManager, conversationStateAccessor, userStateAccessor, serviceManager, telemetryClient)
        {
            var dialog = new WaterfallStep[]
            {
                PromptForName,
                EndDialog
            };

            InitialDialogId = nameof($safeitemname$);
            AddDialog(new WaterfallDialog(nameof($safeitemname$), dialog));
            AddDialog(new TextPrompt($safeitemname$Responses.NamePrompt));
        }
コード例 #8
0
 /// <summary>
 /// Serializes an object to intermediate XML format.
 /// </summary>
 /// <param name="output">Specifies the intermediate XML location, and provides various serialization helpers.</param>
 /// <param name="value">The strongly typed object to be serialized.</param>
 /// <param name="format">Specifies the content format for this object.</param>
 protected override void Serialize(IntermediateWriter output, $safeitemname$ value, ContentSerializerAttribute format)
 {
     // TODO serialize $safeitemname$ fields & properties...
 }
コード例 #9
0
ファイル: View.cs プロジェクト: sefbar/VisualStudioTemplates
 public $safeitemname$View($safeitemname$ controller)
 {
     _controller = controller;
     InitializeComponent();
 }
 public MyToolSettings($safeitemname$ command)
 {
     m_command            = command;
     $safeitemname$MSForm = new $safeitemname$Form();
 }
コード例 #11
0
 public $safeitemname$Layout($safeitemname$ controller) : base(controller)
コード例 #12
0
 /// <summary>
 /// Serializes an object to intermediate XML format.
 /// </summary>
 /// <param name="output">Specifies the intermediate XML location, and provides various serialization helpers.</param>
 /// <param name="value">The strongly typed object to be serialized.</param>
 /// <param name="format">Specifies the content format for this object.</param>
 protected override void Serialize(IntermediateWriter output, $safeitemname$ value, ContentSerializerAttribute format)
 {
     // TODO serialize $safeitemname$ fields & properties...
 }
コード例 #13
0
 /// <summary>
 /// Initializes the workspace for the $safeitemname$ console
 /// </summary>
 /// <param name="console">The console using this workspace</param>
 public $safeitemname$Workspace($safeitemname$Console console) : base(console)