C#: Modification Smart Object

How do I get access to the Smart Object for further modification?
1.PNG.jpg (436.0 KB)
3.png (287.2 KB)
2.png (498.0 KB)
Example photoshop scripting C#:

    private static void UpdateImage(string localFileName, ps.Document doc)
    {
            doc.Application.Load(Path.Combine(Environment.CurrentDirectory, localFileName));
            var photoDoc = doc.Application.ActiveDocument;
            doc.Application.Preferences.RulerUnits = ps.PsUnits.psPixels;

            if (photoDoc.Height != 2600)
            {
                photoDoc.ResizeImage(null, 2600, 300, ps.PsResampleMethod.psBicubicSharper);
            }
            photoDoc.Selection.SelectAll();
            photoDoc.Selection.Copy();
            photoDoc.Close(ps.PsSaveOptions.psDoNotSaveChanges);

            doc.Application.ActiveDocument = doc;
            var photoLayer = doc.ArtLayers.Cast<ps.ArtLayer>().FirstOrDefault(l => l.Name == "Image");
            doc.ActiveLayer = photoLayer;
            var app = doc.Application;

            var placedLayerEditContents = app.StringIDToTypeID("placedLayerEditContents");
            var desc1 = new ps.ActionDescriptor();
            app.ExecuteAction(placedLayerEditContents, desc1, ps.PsDialogModes.psDisplayNoDialogs);

            var smartObjectContents = doc.Application.ActiveDocument;
            smartObjectContents.Selection.SelectAll();
            var newLayer = smartObjectContents.Paste();
            newLayer.Move(smartObjectContents, ps.PsElementPlacement.psPlaceAtBeginning);
            smartObjectContents.Close(ps.PsSaveOptions.psSaveChanges);
    }

@PavelN,

I have observed your comments. Can you please share complete working sample project and also can you please explain your requirement so that we may further investigate to help you out.